Shoutbox

website translation - bug in language selection? - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Translation (/forumdisplay.php?fid=24)
+----- Thread: website translation - bug in language selection? (/showthread.php?tid=27111)

website translation - bug in language selection? by Apatik on 06-12-2004 at 10:41 PM

I've seen that the french (my ^^) translation has been put online, but the script that should change the document.location doesn't work :-/ I'm using Firefox (0.8) but it works with Avant, so it should work in IE too.. I've already sent an email to Patchou about this problem :)

[edit] His answer : don't use firefox xD [/edit]


RE: website translation - bug in language selection? by Mnjul on 06-13-2004 at 02:51 AM

quote:
Originally posted by Apatik
don't use firefox xD
It doesn't seem to be a nice answer though :dodgy:

I remember that according to W3C (I forget where), the script should use window.location instead of document.location. IE does recognize document.location, but it wouldn't be queerish if FF doesn't support it. I'll mail Patchou about this and he may give it a try:).
RE: website translation - bug in language selection? by Patchou on 06-13-2004 at 05:41 AM

Well, it's not my fault if Firefox is not compatible with the browser which is being used by 95% of the people who go on msgplus.net :). As I know that Firefox already has some kind of nasty plugin disabling Flash in the worse possible way, I couln't take this warning very seriously, sorry about that :gfdrin:.

In any case, as Mnjul gave me the fix on a golden platter, I included it. It should now work with your browser :).


RE: website translation - bug in language selection? by KeyStorm on 06-13-2004 at 10:54 AM

Patchou, seriously: I think you're completely wrong about this.
Remember that 100% of windows users are sort of forced to use Internet Explorer unless they download another browser. Mostly n00bs and unconcerned people stick to IE => 90%. If you take a look at the 50 top posters you'll see that percentile dramatically decreases ;).

Any good website builder is concerned with the portability of the code:
- Following W3C standards
- Testing it on most browsers (ie, but not limied to: MSIE, Mozilla, Opera and Safari, at least)

You can't just marginalize a browser because it's less used than another, I thought you'd know that from Plus! compatibility with old and hardly used versions of Messenger, for example :S.

I'm happy anyway that this gets fixed soon :).

PS: Firefox hasn't already anything about blocking flash. There is a third-party plugin that can do so, in order to block ads, not just block any flash that comes through the line :P.


RE: website translation - bug in language selection? by user17033 on 06-13-2004 at 12:04 PM

when will the other languages be added?


RE: website translation - bug in language selection? by CookieRevised on 06-13-2004 at 12:20 PM

[OFF TOPIC]

quote:
Originally posted by gooofi
when will the other languages be added?
There are already many languages added...
RE: website translation - bug in language selection? by Choli on 06-13-2004 at 12:27 PM

quote:
Originally posted by CookieRevised

There are already many languages added...
there is only frech in the dropdown list; of course there a lots added in the ....&lang=xx pages
RE: website translation - bug in language selection? by user17033 on 06-13-2004 at 12:28 PM

i checked it before i posted and the "select your language here" @ msgplus.net shows only "francais"


RE: website translation - bug in language selection? by Apatik on 06-13-2004 at 12:32 PM

it still doesn't work xD


RE: website translation - bug in language selection? by Patchou on 06-13-2004 at 07:51 PM

If it still doesnt work I really doint know what else I could do. And as for following the glorious W3C standards, let me laugh: haha. If Microsoft (and Netscape at the time, for once, I have to give them credits for something) hadn't taken things in their own hands to allow more features in web page, almost nothing would have changed in the past 8 years. Standards are good, as long as they match needs. As far as I am concerned, IE has become the standard, I couldn't care less if another browser is not capable of rendering my pages as IE do. I know this sounds blunt that I'm really speaking my mind here (and this doesnt mean I don't like Firefox, this seems to be a very promising browser).


RE: website translation - bug in language selection? by Choli on 06-13-2004 at 08:20 PM

in the code of the main page of msgplus.net, search

code:
<select size="1" name="language" class="language" onchange="test();">
<option style="color:gray;">Select your language here</option>
<option value="fr">Francais</option>
</select>
and replace it by
code:
<form name="CholiWasHere">
<select size="1" name="language" class="language" onchange="test();">
<option style="color:gray;">Select your language here</option>
<option value="fr">Francais</option>
</select></form>

everyone happy now :P
RE: website translation - bug in language selection? by Patchou on 06-13-2004 at 09:26 PM

done :)


RE: website translation - bug in language selection? by CookieRevised on 06-13-2004 at 09:29 PM

tbh, I don't agree Patchou. This isn't about new standards, this is about implementing the existing standards in the right way. Like Choli said, <select> is a form element, thus you need to include it into a form. You don't make a subroutine in a program without a startheader and a endheader...

Anyways, it works fine now... (Y)

EDIT: blah... I was too slow....

Anyways, the error in MSIE of whish I spoke in my last email (or the mail before that, dunno anymore) is indeed there. It concearns the small background banners shown in the boxes on the right side. I'll try to find out more and test some stuff and then I'll try to explain later...


RE: website translation - bug in language selection? by Patchou on 06-13-2004 at 09:44 PM

Well, I'm sorry but no, this just doesnt do it. I added <form> and here is what it gave me:

[Image: attachment.php?pid=262896]

I've removed it now. I have nothing against standards, they serve some purpose, but at the end, what matters is that they help you do stuff, not prevent you. If you find a good way to fix it, feel free to give me the code :).


RE: website translation - bug in language selection? by Choli on 06-13-2004 at 10:21 PM

quote:
Originally posted by Patchou
[Image: attachment.php?pid=262896]

I don't see anything wrong there :|

If you're talking about that it's moved and now there's more blank space, be sure you don't put any extra space in the code and the <form> is just next to <select>

it should work :P
RE: website translation - bug in language selection? by Patchou on 06-13-2004 at 10:40 PM

quote:
be sure you don't put any extra space in the code
Are you making fun of me? ;). Anyway, there was no extra blank space, its just the <form> tag that did the problem. It seems to add the space of two blank lines which is absolutely not good. You can see on msgplus.net how the combo box is supposed to be displayed.

Thanks for the help :)
Patchou

RE: website translation - bug in language selection? by Choli on 06-13-2004 at 10:54 PM

quote:
Originally posted by Patchou
Are you making fun of me?
yes, of course ... j/k :P No, patch, in any way.
quote:
Originally posted by Patchou
Anyway, there was no extra blank space, its just the <form> tag that did the problem. It seems to add the space of two blank lines which is absolutely not good. You can see on msgplus.net how the combo box is supposed to be displayed.
weird... :mipdodgy:
I'll take a look at it tomorrow. Now it's time to go to bed |-)
quote:
Originally posted by Patchou
Thanks for the help
;)
RE: website translation - bug in language selection? by CookieRevised on 06-13-2004 at 11:43 PM

Like I said before, to use form-elements in a proper way, you need to define a form. The problem with this, as you showed, is that MSIE has a bug when it comes to forms inside tablecells: it puts linebreaks before the selector...
It goes even further, MSIE even puts linebreaks before the table if you put the <form>-tag outside the table.

These bugs from MSIE (it's not a bug in other browsers) should be known by most website-developers because they are indeed very dodgy...

The workaround is to define the form outside the tablecell, but inside the table, so instead of:
<table><tbody><tr><td><form><select></select></form></td></tr></tbody></table>
use:
<table><tbody><form><tr><td><select></select></td></tr></form></tbody></table>


OR


Because you don't define a form, you must search for the form-elements with a script. Just like Guido does in msgplusjs.js. The problem with that is that the names from MSIE and Mozilla based browsers for the layerstructure of a document is different. And the script only checks for the MSIE based names, so that's why Mozilla based browsers return "undefined" and thus the script can't execute further.

The workaround for this is easy:
I've seen in msgplusjs.js that there is a very complicated and unneeded script being used to catch the select-object (with all the problems it brings).
This can be solved by:
Delete the function "GFDD_findObj" and "GFDD_jumpMenuGo", these are not needed because in the html-code the object can be returned directly by the use of the "this"-word like so: <SELECT class=language onchange="GFDD_jumpMenu(this);" size=1>



So, in short: choose one of the two methods:
1) use <table><tbody><form><tr><td><select></select></td></tr></form></tbody></table> and leave the javascript and everything as it is.
2) don't use the <form>-tag and change the select-tag to: <SELECT class=language onchange="GFDD_jumpMenu(this);" size=1> and then you can even remove those two functions (GFDD_findObj and GFDD_jumpMenuGo) in the script.


I hope this helps ;)



RE: website translation - bug in language selection? by WDZ on 06-14-2004 at 03:54 AM

quote:
Originally posted by CookieRevised
<table><tbody><form><tr><td><select></select></td></tr></form></tbody></table>
But that's not valid HTML (a) :P

The more correct solution is using CSS to just remove the spacing (margins):

<form style="margin-top: 0px; margin-bottom: 0px;"><table><tbody><tr><td><select></select></td></tr></tbody></table></form>

So...

code:
<form name="CholiWasHere" style="margin-top: 0px; margin-bottom: 0px;">
<select size="1" name="language" class="language" onchange="test();">
<option style="color:gray;">Select your language here</option>
<option value="fr">Francais</option>
</select></form>

RE: website translation - bug in language selection? by Patchou on 06-14-2004 at 04:16 AM

Bha.... I don't like HTML lol. Thank you for the fixes though, I'll try it out.

EDIT: Seems to work well. Let me knwo if the fox is happy with it now :).


RE: website translation - bug in language selection? by WDZ on 06-14-2004 at 04:42 AM

quote:
Originally posted by Patchou
Seems to work well. Let me knwo if the fox is happy with it now
I dunno about FireFox, but the language selection menu looks and works good in Opera. (y)

* WDZ switches the language to Spanish... [Image: banana_flip.gif]
RE: website translation - bug in language selection? by ddunk on 06-14-2004 at 04:48 AM

quote:
Originally posted by Patchou
Seems to work well. Let me knwo if the fox is happy with it now

Yep, works in Firefox :)
RE: website translation - bug in language selection? by Choli on 06-14-2004 at 11:27 AM

quote:
Originally posted by CookieRevised
I've seen in msgplusjs.js that there is a very complicated and unneeded script being used to catch the select-object (with all the problems it brings).
indeed, dodgy script
quote:
Originally posted by Ddunk
quote:
Originally posted by Patchou
Seems to work well. Let me knwo if the fox is happy with it now

Yep, works in Firefox :)
the global.php page works, but not the main page (where there's no form). Add the same in the main page ;)
RE: website translation - bug in language selection? by Patchou on 06-14-2004 at 04:58 PM

quote:
indeed, dodgy script
You can say all you want about it, I'm not the one who created it. And as far as I'm concerned, everything in it works perfectly well, I don't see any reason to criticize it :p.

I was just coming here to inform you that I did the same change in index.php, I forgoot to do it today.
RE: website translation - bug in language selection? by Guido on 06-14-2004 at 06:58 PM

The script was dodgy, I agree :gfdrin:. And I know it worked with FFox before (I tested the site in every modern browser), though I must have removed the <form> during development.

As for Patchou's opinions regarding browsers "uncompatible with IE"... well, I don't agree :P  These are undocumented behaviours which have no reason to work, if IE decides to make them work good for them, but it's not other browsers' fault.

quote:
As I know that Firefox already has some kind of nasty plugin disabling Flash in the worse possible way, I couln't take this warning very seriously, sorry about that
err... That's pure misinformation :-/

Firefox, as IE, and as Plus!, supports third party plugins. There is a plugin which blocks Flash, and just like every other Flash blocking plug-in for Firefox, Mozilla, Internet Explorer, Opera, Safari or whatever, doesn't do it properly because it does it after loading the page. When msgplus.net uses JS to detect the flash player available or not, the flash blocker isn't active yet. And because the player IS available, it loads the movie and immediately is blocked (made invisible) by the flash blocker.

That's not the worse possible way, it's actually the only possible way except for uninstalling and reinstalling the player in runtime. :-/

That's not something to take Firefox seriously or not, it's just that some people are in slow computers and want to block flash movies and therefore make and use these kind of plugins.

quote:
Standards are good, as long as they match needs.
Indeed. But we are not talking about innovation this time, we are not talking about the IE-only features like the css filters. We are talking about just stupid decisions to make 2 separate names for the same thing :P

(FTR I use IE (avant) :P)