Ren'Py Reverse translation - Merge into code existing translation files to change main files language

Lgn332

Member
May 23, 2018
100
144
Hi all.

I would like to start tinkering with some existing games to learn renpy.

I have chosen Big Brother because the number of assets and decided to use Aleksey90's [Big Brother: Another Story] renpy version as my base.

Problem is the text of the game is in Russian.
Of course, it's translated to English, but not in the main .rpy files.

For example, in the "game\event" folder there is a file called "alice.rpy"
Inside it is this code:

Max_00 "Если полночь, значит Алиса отмокает в ванне... Входить без стука - опасно для жизни."​
"{i}постучаться{/i}":​
menu:​
Alice "{b}Алиса:{/b} Кому там не спится? Я ванну набираю..."​
"Это я, Макс. Можно войти?":​
Alice "{b}Алиса:{/b} Макс, ты глухой? Я же сказала, буду в ванне плескаться. Жди как минимум час!"​
Max_00 "Ладно, ладно..."​
"{i}уйти{/i}":​
pass​
jump alice_bath.end​

It also exists a file also called "alice.rpy" in "game\tl\english\events" with this code:
translate english alice_bath_086088b7:​
Max_00 "If it's midnight, than Alice will be soaking in the bath. Entering will put my life at risk." nointeract​
translate english alice_bath_ab9e6db9:​
Alice "{b}Alice:{/b} Who is it? I'm in the bath..." nointeract​
translate english alice_bath_74fd8c7a:​
Alice "{b}Alice:{/b} Max, are you deaf? I just told you I'm in the bath. Don't come back for at least an hour!"​
translate english alice_bath_84309eb3:​
Max_00 "Okay, okay..."​
old "Это я, Макс. Можно войти?"​
new "It's Max. Can I come in?"​
old "{i}постучаться{/i}"​
new "{i}knock{/i}"​


Is there any way to automate replacing the English translation inside the code?


I would like to obtain something like this:
File "game\event\alice.rpy"​
Max_00 "If it's midnight, than Alice will be soaking in the bath. Entering will put my life at risk."​
"{i}knock{/i}":​
menu:​
Alice "{b}Alice:{/b} Who is it? I'm in the bath..."​
"It's Max. Can I come in?":​
Alice "{b}Alice:{/b} Max, are you deaf? I just told you I'm in the bath. Don't come back for at least an hour!"​
Max_00 "Okay, okay..."​
"{i}уйти{/i}":​
pass​
jump alice_bath.end​

I have downloaded the renpy SDK and tried "Generate Translations" options, including "Merge String Translations" and "Reverse Languages" to no avail.

Thanks in advance!
 
  • Like
Reactions: juleswindu