traslate zambretti to spanish

126 views
Skip to first unread message

Daniel Jerez

unread,
Jan 26, 2017, 11:31:50 AM1/26/17
to weewx-user

Hi, I wanted to know if it was possible to translate Zambretti's data with a forecast extension into another language?

for example:

[[forecast]] A Settled Fine = Bueno y Estable Fine Weather = Buen Tiempo Becoming Fine = Mejorando Fine Becoming Less Settled = Bueno, a Inestable Fine, Possibly showers = Bueno, posibles lloviznas Fairly Fine, Improving = Bastante Bueno, algunas lloviznas Fairly Fine, Possibly showers, early = Bastante Bueno, lloviznas luego Fairly Fine Showery Later = Bastante Bueno, lloviznas luego Showery Early, Improving = Lloviznas, luego mejorando Changeable Mending = Variable Fairly Fine , Showers likely = Bastante Bueno, Algunas lloviznas Rather Unsettled Clearing Later = Inestable, Aclarando luego Unsettled, Probably Improving = Inestable, Posible Mejora Showery Bright Intervals = Lluvioso, Aclarando a intervalos Showery Becoming more unsettled = Lluvioso, tendencia a mejorar Changeable some rain = Variable, Con Precipitaciones Unsettled, short fine Intervals = Inestable, Períodos de mejora Unsettled, Rain later = Inestable, Precipitaciones mas tarde Unsettled, rain at times = Inestable, Algunas Precipitaciones Very Unsettled, Finer at times = Bastante Inestable Rain at times, worse later. = Precipitaciones Ocasionales, empeorando Rain at times, becoming very unsettled = Precipitaciones, muy Inestable Rain at Frequent Intervals = Lluvias Frecuentes Very Unsettled, Rain = Lluvias, altamente Inestable Stormy, possibly improving = Tormentas, puede mejorar Stormy, much rain = Tormentas, Altas Precipitaciones


c

mwall

unread,
Jan 26, 2017, 12:02:50 PM1/26/17
to weewx-user
On Thursday, January 26, 2017 at 11:31:50 AM UTC-5, Daniel Jerez wrote:

Hi, I wanted to know if it was possible to translate Zambretti's data with a forecast extension into another language?

you should put the translation in your skin.conf like this:

[Forecast]
    [[Labels]]
        [[[Zambretti]]]
            A = Bueno y Estable
            B = Buen Tiemp
            C = Mejorano
            ...

then in your templates you use the labels like this:

$forecast.label('Zambretti', 'C')

or like this:

$forecast.label('Zambretti', $forecast.zambretti.code)

see forecast.py for a complete list of the labels that should be translated.  for example, the [[[Weather]]] stanza has labels for cloudy, rain, hail, etc. that are used for wu, nws, and other forecasting services.

one of these days we'll come up with an easier way to do translations...

m

Daniel Jerez

unread,
Feb 15, 2017, 3:11:05 PM2/15/17
to weewx-user
Hi, in skin.conf

[Forecast]    
    [[Labels]]        
        [[[Zambretti]]]
'A' = "Bueno y Estable"
'B' = "Buen Tiempo"
'C' = "Mejorando"
'D' = "Bueno, a Inestable"
'E' = "Bueno, posibles lloviznas"
'F' = "Bastante Bueno, algunas lloviznas"
'G' = "Bastante Bueno, lloviznas luego"
'H' = "Bastante Bueno, lloviznas luego"
'I' = "Lloviznas, luego mejorando"
'J' = "Variable"
'K' = "Bastante Bueno, Algunas lloviznas"
'L' = "Inestable, Aclarando luego"
'M' = "Inestable, Posible Mejora"
'N' = "Lluvioso, Aclarando a intervalos"
'O' = "Lluvioso, tendencia a mejorar"
'P' = "Variable, Con Precipitaciones"
'Q' = "Inestable, Períodos de mejora"
'R' = "Inestable, Precipitaciones mas tarde"
'S' = "Inestable, Algunas Precipitaciones"
'T' = "Bastante Inestable"
'U' = "Precipitaciones Ocasionales, empeorando"
'V' = "Precipitaciones, muy Inestable"
'W' = "Lluvias Frecuentes"
'X' = "Lluvias, altamente Inestable"
'Y' = "Tormentas, puede mejorar"
'Z' = "Tormentas, Altas Precipitaciones"

its work for me.

Regards

Ruben Navarro Huedo

unread,
Feb 16, 2017, 5:12:41 AM2/16/17
to weewx-user
Thank's a lot Daniel.

Running also for me !
Reply all
Reply to author
Forward
0 new messages