La voila ! le version francaise de la meteo ! la version 1.0 des modifications du fichier Weatherplus.vbs a ne pas confondre avec la version du fichier. Il suffit de changer l'integralité de ce fichier par celui la. Des nouvelles versions sont prevus... mais la j'ai plus le temps snif.
Si vous trouvez que la traduction n'est pas correcte mail moi svp
romsworld@fr.st
Lisez le topic juste avant si vous trouvez que la difference du temps avec l'image ne correspond pas !
'YAWS v 0.2 by cicada (cicada@mail.bg) - weather script for Samurize 0.84 and higher
'Temperature, city and environment management
'Compatibile with Samurize 0.84 and probably with higher viersions
'Weather information provided by Intercept Vector (
http://weather.interceptvector.com)
'For Sofia, Bulgaria, using Celsius it is:
http://weather.interceptvector.com/weather...U=&celsius=true
Option Explicit
On Error Resume Next
const SAMURIZE_DIRECTORY= "C:Program FilesSamurize" 'change if different than yours
const USE_CELSIUS= True 'make it False if you want Fahrenheit
' --- DO NOT TOUCH THE CODE AFTER THAT POINT UNLESS YOU KNOW WHAT YOU ARE DOING ---
Dim wDoc, wCity, wTemp, wSky, fNodes, date1, date2, date3, date4, temp1, temp2, temp3, temp4, sky1, sky2, sky3, sky4
Set wDoc = CreateObject("Msxml2.DOMDocument")
wDoc.async = False
wDoc.load(SAMURIZE_DIRECTORY & "Scriptsweather.cache.xml")
wCity = wDoc.selectSingleNode("//weather/city").text
wTemp = wDoc.selectSingleNode("//weather/temp").text
wSky = wDoc.selectSingleNode("//weather/sky").text
Set fNodes= wDoc.getElementsByTagName("forecast")
date1= getFCDate(1)
date2= getFCDate(2)
date3= getFCDate(3)
date4= getFCDate(4)
temp1= getFCTemp(1)
temp2= getFCTemp(2)
temp3= getFCTemp(3)
temp4= getFCTemp(4)
sky1= getFCSky(1)
sky2= getFCSky(2)
sky3= getFCSky(3)
sky4= getFCSky(4)
Function getCity
getCity= wCity
End Function
Function getTemperature
If (USE_CELSIUS= True) Then
getTemperature= wTemp & "°C"
Else
getTemperature= wTemp & "F"
End If
End Function
' Traduit par Romsworld - Version 1.0 - Pour toutes questions suggestions ou bugs Email : (romsworld@fr.st)
Function getSky
if (WSky="Windy") Then
getSky= "Venté"
End If
if (WSky="Thunder Storms") Then
getSky= "Orage/Foudre"
End If
if (WSky="Snow") Then
getSky= "Neige"
End If
if (WSky="Sleet") Then
getSky= "Verglas"
End If
if (WSky="Rain") Then
getSky= "Pluie"
End If
if (WSky="Heavy Rain") Then
getSky= "Forte Pluie"
End If
if (WSky="Light Flurries") Then
getSky= "Vent Légé"
End If
if (WSky="Flurries") Then
getSky= "Vent"
End If
if (WSky="Dust") Then
getSky= "Poussière"
End If
if (WSky="Fog") Then
getSky= "Brouillard"
End If
if (WSky="Haze") Then
getSky= "Brume"
End If
if (WSky="Smoke") Then
getSky= "Fumée"
End If
if (WSky="Cold") Then
getSky= "Froid"
End If
if (WSky="Cloudy") Then
getSky= "Nuageux"
End If
if (WSky="Mostly Cloudy") Then
getSky= "Souvent nuageux"
End If
if (WSky="Partly Cloudy") Then
getSky= "Quelques nuages"
End If
if (WSky="Sunny") Then
getSky= "Ensoleillé"
End If
if (WSky="Mostly Sunny") Then
getSky= "Souvent Ensoleillé"
End If
if (WSky="Hot") Then
getSky= "Chaud"
End If
if (wSky="Snow and Wind") Then
getSky= "Neige + vent"
End If
End Function
Function getFCDate1
getFCDate1= date1
End Function
Function getFCDate2
getFCDate2= date2
End Function
Function getFCDate3
getFCDate3= date3
End Function
Function getFCDate4
getFCDate4= date4
End Function
Function getFCTemp1
getFCTemp1= temp1
End Function
Function getFCTemp2
getFCTemp2= temp2
End Function
Function getFCTemp3
getFCTemp3= temp3
End Function
Function getFCTemp4
getFCTemp4= temp4
End Function
Function getFCSky1
if (sky1="Windy") Then
getFCSky1= "Venté"
End If
if (sky1="Thunder Storms") Then
getFCSky1= "Orage/Foudre"
End If
if (sky1="Snow") Then
getFCSky1= "Neige"
End If
if (sky1="Sleet") Then
getFCSky1= "Verglas"
End If
if (sky1="Rain") Then
getFCSky1= "Pluie"
End If
if (sky1="Heavy Rain") Then
getFCSky1= "Forte Pluie"
End If
if (sky1="Light Flurries") Then
getFCSky1= "Vent Légé"
End If
if (sky1="Flurries") Then
getFCSky1= "Vent"
End If
if (sky1="Dust") Then
getFCSky1= "Poussière"
End If
if (sky1="Fog") Then
getFCSky1= "Brouillard"
End If
if (sky1="Haze") Then
getFCSky1= "Brume"
End If
if (sky1="Smoke") Then
getFCSky1= "Fumée"
End If
if (sky1="Cold") Then
getFCSky1= "Froid"
End If
if (sky1="Cloudy") Then
getFCSky1= "Nuageux"
End If
if (sky1="Mostly Cloudy") Then
getFCSky1= "Souvent nuageux"
End If
if (sky1="Partly Cloudy") Then
getFCSky1= "Quelques nuages"
End If
if (sky1="Sunny") Then
getFCSky1= "Ensoleillé"
End If
if (sky1="Mostly Sunny") Then
getFCSky1= "Souvent Ensoleillé"
End If
if (sky1="Hot") Then
getFCSky1= "Chaud"
End If
if (sky1="Snow and Wind") Then
getFCSky1= "Neige + vent"
End If
End Function
Function getFCSky2
if (sky2="Windy") Then
getFCSky2= "Venté"
End If
if (sky1="Thunder Storms") Then
getFCSky2= "Orage/Foudre"
End If
if (sky2="Snow") Then
getFCSky2= "Neige"
End If
if (sky2="Sleet") Then
getFCSky2= "Verglas"
End If
if (sky2="Rain") Then
getFCSky2= "Pluie"
End If
if (sky2="Heavy Rain") Then
getFCSky2= "Forte Pluie"
End If
if (sky2="Light Flurries") Then
getFCSky2= "Vent Légé"
End If
if (sky2="Flurries") Then
getFCSky2= "Vent"
End If
if (sky2="Dust") Then
getFCSky2= "Poussière"
End If
if (sky2="Fog") Then
getFCSky2= "Brouillard"
End If
if (sky2="Haze") Then
getFCSky2= "Brume"
End If
if (sky2="Smoke") Then
getFCSky2= "Fumée"
End If
if (sky2="Cold") Then
getFCSky2= "Froid"
End If
if (sky2="Cloudy") Then
getFCSky2= "Nuageux"
End If
if (sky2="Mostly Cloudy") Then
getFCSky2= "Souvent nuageux"
End If
if (sky2="Partly Cloudy") Then
getFCSky2= "Quelques nuages"
End If
if (sky2="Sunny") Then
getFCSky2= "Ensoleillé"
End If
if (sky2="Mostly Sunny") Then
getFCSky2= "Souvent Ensoleillé"
End If
if (sky2="Hot") Then
getFCSky2= "Chaud"
End If
if (sky2="Snow and Wind") Then
getFCSky2= "Neige + vent"
End If
End Function
Function getFCSky3
if (sky3="Windy") Then
getFCSky3= "Venté"
End If
if (sky3="Thunder Storms") Then
getFCSky3= "Orage/Foudre"
End If
if (sky3="Snow") Then
getFCSky3= "Neige"
End If
if (sky3="Sleet") Then
getFCSky3= "Verglas"
End If
if (sky3="Rain") Then
getFCSky3= "Pluie"
End If
if (sky3="Heavy Rain") Then
getFCSky3= "Forte Pluie"
End If
if (sky3="Light Flurries") Then
getFCSky3= "Vent Légé"
End If
if (sky3="Flurries") Then
getFCSky3= "Vent"
End If
if (sky3="Dust") Then
getFCSky3= "Poussière"
End If
if (sky3="Fog") Then
getFCSky3= "Brouillard"
End If
if (sky3="Haze") Then
getFCSky3= "Brume"
End If
if (sky3="Smoke") Then
getFCSky3= "Fumée"
End If
if (sky3="Cold") Then
getFCSky3= "Froid"
End If
if (sky3="Cloudy") Then
getFCSky3= "Nuageux"
End If
if (sky3="Mostly Cloudy") Then
getFCSky3= "Souvent nuageux"
End If
if (sky3="Partly Cloudy") Then
getFCSky3= "Quelques nuages"
End If
if (sky3="Sunny") Then
getFCSky3= "Ensoleillé"
End If
if (sky3="Mostly Sunny") Then
getFCSky3= "Souvent Ensoleillé"
End If
if (sky3="Hot") Then
getFCSky3= "Chaud"
End If
if (sky3="Snow and Wind") Then
getFCSky3= "Neige + vent"
End If
End Function
Function getFCSky4
if (sky4="Windy") Then
getFCSky4= "Venté"
End If
if (sky4="Thunder Storms") Then
getFCSky4= "Orage/Foudre"
End If
if (sky4="Snow") Then
getFCSky4= "Neige"
End If
if (sky4="Sleet") Then
getFCSky4= "Verglas"
End If
if (sky4="Rain") Then
getFCSky4= "Pluie"
End If
if (sky4="Heavy Rain") Then
getFCSky4= "Forte Pluie"
End If
if (sky4="Light Flurries") Then
getFCSky4= "Vent Légé"
End If
if (sky4="Flurries") Then
getFCSky4= "Vent"
End If
if (sky4="Dust") Then
getFCSky4= "Poussière"
End If
if (sky4="Fog") Then
getFCSky4= "Brouillard"
End If
if (sky4="Haze") Then
getFCSky4= "Brume"
End If
if (sky4="Smoke") Then
getFCSky4= "Fumée"
End If
if (sky4="Cold") Then
getFCSky4= "Froid"
End If
if (sky4="Cloudy") Then
getFCSky4= "Nuageux"
End If
if (sky4="Mostly Cloudy") Then
getFCSky4= "Souvent nuageux"
End If
if (sky4="Partly Cloudy") Then
getFCSky4= "Quelques nuages"
End If
if (sky4="Sunny") Then
getFCSky4= "Ensoleillé"
End If
if (sky4="Mostly Sunny") Then
getFCSky4= "Souvent Ensoleillé"
End If
if (sky4="Hot") Then
getFCSky4= "Chaud"
End If
if (sky4="Snow and Wind") Then
getFCSky4= "Neige + vent"
End If
End Function
Function getFCDate (aNodeId)
Dim res
res= fNodes.item(aNodeId).attributes.getNamedItem("date ").NodeValue
getFCDate= Month (res) & " " & getDayName(Day(res))
End Function
Function getFCTemp (aNodeId)
Dim tSign
If (USE_CELSIUS= True) Then
tSign= "°C"
Else
tSign= "F"
End If
getFCTemp= fNodes.item(aNodeId).childNodes.item(1).text & "/" & fNodes.item(aNodeId).childNodes.item(2).text & tSign
End Function
Function getFCSky (aNodeId)
getFCSky= fNodes.item(aNodeId).childNodes.item(4).text
End Function
Function getDayName (aDayNum)
Dim res
Select Case aDayNum
Case 1 res="Jan"
Case 2 res="Fev"
Case 3 res="Mars"
Case 4 res="Avr"
Case 5 res="Mai"
Case 6 res="Juin"
Case 7 res="Juil"
Case 8 res="Aout"
Case 9 res="Sept"
Case 10 res="Oct"
Case 11 res="Nov"
Case 12 res="Dec"
End Select
getDayName= res
End Function
Set fNodes = Nothing
Set wDoc=Nothing