Tl;DR: Why are dialogue translations for the default None language handled differently than those of any other language?
Long explanation: We've released a demo for our new project during the recent Steam Game Festival, and as it often happens our players found some typos and awkward wording in the English text. We wanted to release a quick hotfix with those errors removed, bu-u-ut... we have a bunch of translations, and as we know, changing the original dialogue lines even slightly, will change the line's unique identifier, that would require updating it in every language translation.
I thought of a possible solution to do it quickly by creating blank translation files in the game/tl/None folder and filling them with only the lines that needed to be changed. I actually used it as a way to change some GUI strings without reimporting all the translations, so I was sure it would also work for dialogue translations as well. My thinking was that as with any other language, if there wouldn't be a "translation" for all the unchanged lines, it would just fall back to the original language lines.
I was wrong. What it does in practice, is play the lines preceding the "translated" lines, then showing any "translated" lines, skipping all the lines that are not in the doc, and then it returns into the main menu. Duh.
Of course we decided against releasing the hotfix, but now that the Festival is over, I decided to look into it, because I think using the None dialogue translation could be a really neat way to non-destructively edit the in-game lines without touching all the other translations, wasting time and risking regression. My theory was that somehow, unlike with normal translations, the game was switching entirely to the translation blocks themselves and executing them in sequence. And today I found this quote in renpy.ast.Translation source
Code: Select all
If language is None, when executed this transfers control to the translate
statement in the current language, if any, and otherwise runs the block.
If language is not None, causes an error to occur if control reaches this
statement.