The International Simutrans Forum

Development => Scripting Scenarios and AI => Topic started by: Yona-TYT on May 28, 2020, 08:24:05 AM

Title: Translations are not updated when changing languages
Post by: Yona-TYT on May 28, 2020, 08:24:05 AM

I have noticed that when changing the language the translations that come from "tab" files (like es.tab) do not update, they only do it after reloading the scenario.
Title: Re: Translations are not updated when changing languages
Post by: Yona-TYT on July 07, 2020, 04:27:24 PM
Can you replicate this?
This appears to affect links.

To replicate load the scenario with the language in English, once loaded change the language to Spanish.script:
https://www.mediafire.com/file/kyxbetzfi26ph6j/tutorial_pak64v-1.4.00-test-4.zip/file (https://www.mediafire.com/file/kyxbetzfi26ph6j/tutorial_pak64v-1.4.00-test-4.zip/file)
You will notice the following:
The text of links "This is a town center, This is a factory, This is a station, This is a link" should change to the Spanish language.
(https://www.mediafire.com/convkey/a6cb/3lyn7bczfzu5udp6g.jpg)
If you load the scenario again "keeping the language in Spanish" the texts appear correctly translated.
Title: Re: Translations are not updated when changing languages
Post by: Dwachs on July 09, 2020, 06:33:18 PM
It seems that the script does not recompute some strings. In these get_*_text all strings need to be recomputed.
Title: Re: Translations are not updated when changing languages
Post by: Yona-TYT on July 09, 2020, 08:34:39 PM
I suppose it is a problem with the script? In this case I am not sure how to solve.