I wanted to include localized rendered text in my scenario. This looks like very easy thing to do and it was, as rendering.draw_text supports localized strings. So I included my own locale file into the scenario and added the localized message.
This works fine when spawning the renders, but when you save the game and load it again, all scenario-localized rendering texts change to Unknown key error messages. Localized texts using vanilla locales load fine. Creating new renderings with same locale keys also work fine, until one saves the game and loads it again. Localization is loading properly for chat messages and gui and everything.
I created absolutely tiny scenario to demonstrate this (attachments). Steps to reproduce are then :
1) start a scenario that uses own locale files
2) use draw_text that use localized string from the scenario's locale
3) save the game, exit, and load the game again. Scenario's locales will be broken.
When game opened first time and scenario creates cars with added render texts bound to them, the top left one has
Code: Select all
text = {"entity-name.car"}
Code: Select all
text = {"my_locale.car"}