Hi
I’m trying to build a weather command translating the parts from English to Spanish, for that I based on this post Weather to another language?
So far so good, but I wanted to go a little further and also translate the variables that the command throws, but I ran into the problem that I do not reach the characters … my question is if there is a way to use a pastebin to replace this part of the command in specific and so I can translate it in its entirety. Note: I had to omit the “at” part in the wind forecast because it gave error since it uses the word “temperatura” and modifies the “at” inside the word, I do not know if there is a way to correct this too.
$(eval '$(weather $(query))'.replace('Weather for', 'El tiempo para').replace('Conditions are', 'Las condiciones meteorológicas son').replace('with a temperature of', 'con una temperatura de').replace('The wind is blowing from the', 'La dirección del viento es').replace('and the current humidity is', 'y la humedad actual es del').replace('No location provided', 'Escribe tu ciudad/país en Inglés.'))
I thank you in advance, any idea is welcome, my head exploded trying, I am noob in all this command programming, but little by little I am learning thanks to this site and to all those who share their knowledge.
Thank you a lot. This solved the issue for me. The only thing not working properly as intended for me is the “at” that leonxnez said. It gives a problem if translated. Similar to that also “and the” before “current humidity” and “is” after that “current humidity”. When i’m trying to translate those words it turns into a bug to me.
However is already cool like this, thank you a lot.
Thank you so much Emily!!! it worked perfectly! I really appreciate you helping us to solve these problems that we are facing when we have ideas to improve the user experience within the streams.