Ren'Py How to generate translation in Re'Py

Moricano

Well-Known Member
Jan 30, 2019
1,666
1,126
How to generate translation in Re'Py , making that in the tl folder the script lines are only one line.

I've been doing translations but it's always 2 lines the 2 is the one I should translate.

But I've been checking out some games, and I've noticed that they only have 1 line of the chosen language instead of 2 as mine is.

I need help on this topic does anyone know how I can create this within the Re'Py program?

Thanks for everyone's attention.(y)
 

Bev_

Member
Nov 17, 2018
477
775
I'm not sure what you mean, so I'll go over this:

So first of all, lines with '#' at the beginning are comments. They are only there for your information and have no effect in-game. This two comments provide you with location of the dialog in script/files and their original text (so you know what you're translating).
Code:
# game/scripts/d1.rpy:28
translate polish barscene1_dbf14dea:

    # "However, this would not last"
    "To nie potrwało jednak długo."
So the code may look like this:
Code:
translate polish barscene1_dbf14dea:
    "To nie potrwało jednak długo."
And nothing will change functionality wise.
So you could delete them, but I see no point in doing so.
There is probably pretty easy way of doing it automatically, however I don't think you can initially generate translation without them, unless I'm missing something.

edit: Could it be, that those other files you looked at were uncompiled .rpyc? Because renpy loses comments while compiling.
 
Last edited:

Moricano

Well-Known Member
Jan 30, 2019
1,666
1,126
And nothing will change functionality wise.
So you could delete them, but I see no point in doing so.
There is probably pretty easy way of doing it automatically, however I don't think you can initially generate translation without them, unless I'm missing something.

edit: Could it be, that those other files you looked at were uncompiled .rpyc? Because renpy loses comments while compiling.
I don't know how to answer this, because I checked a game that I downloaded that contained up to 4 languages and I've been opening the scripts and they all had 1 line.
I've been dealing with translation for a while, but I've never seen this 1-line system, so I was curious to learn.
But as you said yourself that the line that contains this # can be deleted so maybe I'll do that then.
It was worth the attention.(y)