Bare-bones translation selector, making some texts translatable and common translation

This commit is contained in:
2022-10-24 03:43:37 -03:00
parent 2fa6740103
commit af4fff8df5
3 changed files with 797 additions and 685 deletions

View File

@ -467,7 +467,7 @@ screen bonus_chapter_button(f="gui/button/menubuttons/template_idle.png"):
$ persistent.old_endings = persistent.endings
else:
add f xalign 0.5 yalign 0.5 zoom 1 xanchor 0 xcenter 0.5 ycenter 0.5
text "Bonus Chapters" xalign 0.5 yalign 0.5 xanchor 0.5
text _("Bonus Chapters") xalign 0.5 yalign 0.5 xanchor 0.5
# label_functions is [ [ "label", function() ], [ "foobar", foobar() ], .. ]
# Reuse the same image string and keep things 'neat'.
@ -506,9 +506,9 @@ screen main_menu():
add Solid(gui.accent_color)
at bonus_notif
if persistent.endings == 0b1111:
text "You have unlocked all bonus chapters!" style "main_menu_text" yalign 0.5
text _("You have unlocked all bonus chapters!") style "main_menu_text" yalign 0.5
else:
text "You have unlocked new bonus chapters, complete unseen endings to see more!" style "main_menu_text" yalign 0.5
text _("You have unlocked new bonus chapters, complete unseen endings to see more!") style "main_menu_text" yalign 0.5
## The use statement includes another screen inside this one. The actual
## contents of the main menu are in the navigation screen.
@ -524,24 +524,24 @@ screen main_menu():
xpos 1885
ypos 1130
if renpy.seen_image('big ending'):
use main_menu_button("template_black", "Start", Start())
use main_menu_button("template_black", _("Start"), Start())
use bonus_chapter_button("template_black")
use main_menu_buttons("template_black",
[
[ "Load", ShowMenu("load") ],
[ "Options", ShowMenu("preferences") ],
[ "Extras", ShowMenu("extras") ], \
[ "Quit", Quit(confirm=not main_menu) ]
[ _("Quit"), Quit(confirm=not main_menu) ]
] )
else:
use main_menu_button("gui/button/menubuttons/template_idle.png", "Start", Start())
use main_menu_button("gui/button/menubuttons/template_idle.png", _("Start"), Start())
use bonus_chapter_button()
use main_menu_buttons("gui/button/menubuttons/template_idle.png",
[
[ "Load", ShowMenu("load") ],
[ "Options", ShowMenu("preferences") ],
[ "Extras", ShowMenu("extras") ], \
[ "Quit", Quit(confirm=not main_menu) ]
[ _("Quit"), Quit(confirm=not main_menu) ]
] )
on "show" action renpy.start_predict_screen("cg_gallery")
@ -1007,6 +1007,13 @@ screen preferences():
## Additional vboxes of type "radio_pref" or "check_pref" can be
## added here, to add additional creator-defined preferences.
vbox:
style_prefix "check"
label _("Language")
$ persistent.chose_lang = True
textbutton "English" action Language(None)
textbutton "Español" action Language("es")
null height (4 * gui.pref_spacing)
hbox: