Page 1 of 1

Build 881 - Beaufort String change?

Posted: Fri 04 Dec 2009 11:43 am
by emsiwx
Hello,

since the last build, I have noticed , that the string Ligt breeze is not translated using script on indexT.htm:

<script type="text/javascript">
var beaudesc = "<#beaudesc>";
if (beaudesc=="Calm"){document.write("Bezvetrie");} else
if (beaudesc=="Light Air"){document.write("Vánok");} else
if (beaudesc=="Light breeze"){document.write("Slabý vietor");} else
if (beaudesc=="Gentle breeze"){document.write("Mierny vietor");} else
if (beaudesc=="Moderate breeze"){document.write("Dosť čerstvý vietor");} else
if (beaudesc=="Fresh breeze"){document.write("Čerstvý vietor");} else
if (beaudesc=="Strong breeze"){document.write("Silný vietor");} else
if (beaudesc=="Near gale"){document.write("Prudký vietor");} else
if (beaudesc=="Gale"){document.write("Búrlivý vietor");} else
if (beaudesc=="Strong gale"){document.write("Víchrica");} else
if (beaudesc=="Storm"){document.write("Silná víchrica");} else
if (beaudesc=="Violent storm"){document.write("Mohutná víchrica");} else
if (beaudesc=="Hurricane"){document.write("Orkán");} else
if (beaudesc=="Steady"){document.write("Ustálený");} else
{document.write("Light breeze");}
</script>

Before, no problem at all. Now only Light Breeze is not being translated. Only thing I can think about is if the string changed inside the new build, e.g. like now it contains a bckspace or another invisible character?

Re: Build 881 - Beaufort String change?

Posted: Fri 04 Dec 2009 11:52 am
by steve
emsiwx wrote:if (beaudesc=="Light Air"){document.write("Vánok");} else
I may have changed the "Light air" one, it now reads as in my quotes, i.e. lower case "a".

I think there's a bug in your code so that "Light breeze" is the default if the string isn't recognised:
{document.write("Light breeze");}
should be:

{document.write("<#beaudesc>");}

So your code is not finding "Light air" and is outputting "Light breeze".

But why do you not use the strings.ini file anyway?

Re: Build 881 - Beaufort String change?

Posted: Fri 04 Dec 2009 12:12 pm
by emsiwx
Thank you Steve, u were right.

I plan to translate and use string.ini in few days.

Cheers.

EmsiWx