Text in screens
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.
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.
- Triority
- Regular
- Posts: 134
- Joined: Fri Jul 20, 2018 1:28 pm
- Completed: Welcome To... Chichester 0, 1,2 OVN 1, OVN 2, OVN 3, No Regrets For The Future
- Projects: Welcome To... Chichester series
- Organization: Triority
- itch: triority
- Location: England
- Contact:
Text in screens
Is there a way of extracting text (for translation or otherwise) from inside screen() functions? I use something like text __('Text') but it wont extract
- Ocelot
- Eileen-Class Veteran
- Posts: 1882
- Joined: Tue Aug 23, 2016 10:35 am
- Github: MiiNiPaa
- Discord: MiiNiPaa#4384
- Contact:
Re: Text in screens
Can you show an example of what does not work?
Generally "Mark string as translateable" (_()) and "translate immideately" (__()) are enough if the rest of code is translation-friendly.
Generally "Mark string as translateable" (_()) and "translate immideately" (__()) are enough if the rest of code is translation-friendly.
< < insert Rick Cook quote here > >
- Triority
- Regular
- Posts: 134
- Joined: Fri Jul 20, 2018 1:28 pm
- Completed: Welcome To... Chichester 0, 1,2 OVN 1, OVN 2, OVN 3, No Regrets For The Future
- Projects: Welcome To... Chichester series
- Organization: Triority
- itch: triority
- Location: England
- Contact:
Re: Text in screens
One example would be :
screen parentDialogue_S_1():
text "{font="+persistent.pref_text_font+"}{size=+0}{color=#d10aab}"+__('As requested, here\'s your report.')+"{/color}{/size}{/font}" at alpha_dissolve xpos MESSAGE_LEFT xanchor 0.0 ypos BASEMESSAGE_YPOS+(MESSAGE_YPOS*0.0) yanchor 0.0
screen parentDialogue_S_1():
text "{font="+persistent.pref_text_font+"}{size=+0}{color=#d10aab}"+__('As requested, here\'s your report.')+"{/color}{/size}{/font}" at alpha_dissolve xpos MESSAGE_LEFT xanchor 0.0 ypos BASEMESSAGE_YPOS+(MESSAGE_YPOS*0.0) yanchor 0.0
- Ocelot
- Eileen-Class Veteran
- Posts: 1882
- Joined: Tue Aug 23, 2016 10:35 am
- Github: MiiNiPaa
- Discord: MiiNiPaa#4384
- Contact:
Re: Text in screens
__() should add string in list of transaltable strings. Did you regenerate translation file after adding it? Did you check whole translate strings statement that was generated? Sometimes string you want is hidden between unrelated strings.
< < insert Rick Cook quote here > >
- Triority
- Regular
- Posts: 134
- Joined: Fri Jul 20, 2018 1:28 pm
- Completed: Welcome To... Chichester 0, 1,2 OVN 1, OVN 2, OVN 3, No Regrets For The Future
- Projects: Welcome To... Chichester series
- Organization: Triority
- itch: triority
- Location: England
- Contact:
Re: Text in screens
Ah, yes. Found it in the translated files. That's good.
Thanks for your help!
Thanks for your help!
Who is online
Users browsing this forum: Bing [Bot]