Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Hi !.
First of all. i am sorry for my English.
In this topic viewtopic.php?f=51&t=25245 some dev gave us his code for quest log.
I look it in and see this (full code in quests.rpy)
goals.append(Goal("peter", "Find and help Peter"))
goals.append(Goal("paul", "Find and help Paul"))
goals.append(Goal("mary", "Find and help Mary"))
goals.append(Goal("finish", "Return to Eileen for your reward"))
stages.append(Stage("peter,paul,mary", "atlast"))
stages.append(Stage("finish"))
quests.append(Quest("Eileen's Quest",
"Help Eileen out by helping out her friends Peter, Paul, and Mary who are each in different rooms. Eileen is in the pink room.",
"Tutorial",
goals,
stages)
I am trying to create some translation for this code. Renpy didn`t create any templates for this code.
So my question is: How I can translate strings in complex python structure?
You can use function _ to generate translations for some strings. Do not aply it to lines which do not need to be translated (like id or something like that)
Ocelot wrote:You can use function _ to generate translations for some strings. Do not aply it to lines which do not need to be translated (like id or something like that)
image tooltip_inventory_dark_side_letter = LiveComposite((700, 73), (3,0), ImageReference("information"),
(3,30), Text(__("Это первое, что я нашел у себя в карманах. Вы не поверите, но это - письмо!"), style="tips_bottom"))
# items.rpy:58
old "Это первое, что я нашел у себя в карманах. Вы не поверите, но это - письмо!"
new "This was the first thing I found in my pockets. You could not believe but it's a latter!
But as I found - images in renpy create in init stage - so I see tooltip as image with untranslated text.
can I somehow fix it?
Or I need redone tooltip mech without any image?
If normal translation doesn't work, ConditonSwitch might, you can condition whichever text is displayed with the language in use. I've never translated anything in Ren'Py but there is no reason for it to fail. The second sentence is horribly translated btw, both in spelling and grammar.
xela wrote:If normal translation doesn't work, ConditonSwitch might, you can condition whichever text is displayed with the language in use. I've never translated anything in Ren'Py but there is no reason for it to fail. The second sentence is horribly translated btw, both in spelling and grammar.
Thanks.
For now I create some workarounds.
ps Yes I now that my English is not so well). So thanks twice.)