Translation support - Part 1

* Added language switch option (WIP)
* Fixed translation generation cache cleanup
* Fixed python strings being untranslatable (partially)
This commit is contained in:
LoafyLemon 2022-10-31 20:35:00 +00:00
parent 24c27d40ce
commit 5c952fe7da
80 changed files with 620 additions and 584 deletions

View File

@ -44,11 +44,11 @@ label update_astoria:
$ random_number = renpy.random.randint(0, 5)
if random_number in [1,5]:
$ ast_susan_name = renpy.random.choice(["Suzy","Cow","Cow Tits","Milk Bag","Slut","Whore","Piggy","Pig","Bessie","Moo Moo"])
$ ast_susan_name = renpy.random.choice([_("Suzy"), _("Cow"), _("Cow Tits"), _("Milk Bag"), _("Slut"), _("Whore"), _("Piggy"), _("Pig"), _("Bessie"), _("Moo Moo")])
if random_number in [2,5]:
$ ast_tonks_name = renpy.random.choice(["Hag","Old Hag","Punk","Dyke","Lesbo"])
$ ast_tonks_name = renpy.random.choice([_("Hag"), _("Old Hag"), _("Punk"), _("Dyke"), _("Lesbo")])
if random_number in [3,5]:
$ ton_astoria_name = renpy.random.choice(["Cutie","Kitty","Princess","Cupcake","Honey"])
$ ton_astoria_name = renpy.random.choice([_("Cutie"), _("Kitty"), _("Princess"), _("Cupcake"), _("Honey")])
# Chibi Update
$ astoria_chibi.update()

View File

@ -36,7 +36,7 @@ label astoria_summon_setup:
ast "What?!" ("scream", "narrow", "angry", "mid", xpos="base", ypos="base", trans=d3)
ast "" ("angry", "narrow", "angry", "mid")
call describe_mood("Astoria", ast_mood)
call describe_mood(_("Astoria"), ast_mood)
call tutorial("moodngifts")
else:
if game.daytime:

View File

@ -1,6 +1,6 @@
# Imperius Curse
default ag_st_imperio = event_class(
title = "Imperio Training", start_label = "ag_st_imperio", start_tier = 1,
title = _("Imperio Training"), start_label = "ag_st_imperio", start_tier = 1,
events = [
[
["ag_st_imperio_E1"],
@ -16,7 +16,7 @@ default ag_st_imperio = event_class(
)
default ag_se_imperio_sb = event_class(
title = "Cast Imperio on Susan", start_label = "ag_se_imperio_sb", start_tier = 1,
title = _("Cast Imperio on Susan"), start_label = "ag_se_imperio_sb", start_tier = 1,
events = [
[
["ag_se_imperio_sb_E1"],

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -7,10 +7,10 @@ default astoria_chatted = False
default astoria_outfits_schedule = True
# Names
default astoria_name = "Astoria"
default ast_genie_name = "Sir"
default ast_susan_name = "Cow"
default ast_tonks_name = "Old Hag"
default astoria_name = _("Astoria")
default ast_genie_name = _("Sir")
default ast_susan_name = _("Cow")
default ast_tonks_name = _("Old Hag")
# Stats
default ast_whoring = 0 # Affection level

View File

@ -946,7 +946,7 @@ label cc_pf_strip_T2_intro_E3:
pause .8
# Panties acquired message!
call give_reward(">You have acquired Cho's panties!", "interface/icons/panties.webp")
call give_reward(_(">You have acquired Cho's panties!"), "interface/icons/panties.webp")
$ has_cho_panties = True
gen "Well then, Miss Chang..." ("base", xpos="far_left", ypos="head")
@ -1126,7 +1126,7 @@ label cc_pf_strip_T2_E3: # Repeats
call nar(">Cho throws her panties at you.")
# Panties acquired message!
call give_reward(">You have acquired Cho's panties!", "interface/icons/panties.webp")
call give_reward(_(">You have acquired Cho's panties!"), "interface/icons/panties.webp")
$ has_cho_panties = True
gen "Nice!" ("grin", xpos="far_left", ypos="head")
@ -1548,7 +1548,7 @@ label cc_pf_strip_T2_hermione:
call bld
gen "Nice, I still got her panties!" ("grin", xpos="far_left", ypos="head")
call give_reward(">You have acquired Cho's panties!", "interface/icons/panties.webp")
call give_reward(_(">You have acquired Cho's panties!"), "interface/icons/panties.webp")
$ has_cho_panties = True
# Reset Hermione clothing.
@ -1691,7 +1691,7 @@ label cc_pf_strip_T3_intro_E1:
pause .5
# Panties acquired message!
call give_reward(">You have acquired Cho's panties!", "interface/icons/panties.webp")
call give_reward(_(">You have acquired Cho's panties!"), "interface/icons/panties.webp")
$ has_cho_panties = True
else:

View File

@ -19,7 +19,7 @@ label cho_panties_response_T2:
call cho_walk("desk", "base")
pause .8
call give_reward("> You hand over the panties...", "interface/icons/panties_cum.webp")
call give_reward(_("> You hand over the panties..."), "interface/icons/panties_cum.webp")
$ renpy.sound.play("sounds/cloth_sound3.ogg")
pause .4
@ -115,7 +115,7 @@ label cho_panties_response_T3:
call cho_walk("desk", "base")
pause .8
call give_reward("> You hand over the panties...", "interface/icons/panties_cum.webp")
call give_reward(_("> You hand over the panties..."),"interface/icons/panties_cum.webp")
cho "(...)" ("upset", "base", "base", "down", cheeks="blush", xpos="mid", ypos="base", trans=blackfade)
gen "Something wrong?" ("base", xpos="far_left", ypos="head")

View File

@ -1,6 +1,6 @@
# Cho Favors
# cc_pf = Cho Chang Personal Favor
default cc_pf_talk = event_class(title = "Talk to me!", start_label = "cc_pf_talk", start_tier = 1,
default cc_pf_talk = event_class(title = _("Talk to me!"), start_label = "cc_pf_talk", start_tier = 1,
events = [
[
["cc_pf_talk_T1_intro_E1"],
@ -21,7 +21,7 @@ default cc_pf_talk = event_class(title = "Talk to me!", start_label = "cc_pf_tal
iconset = [["heart_empty", "heart_red"], ["heart_empty", "heart_red"], ["heart_empty", "heart_red"]]
)
#cc_pf_strip_T3_intro_E3
default cc_pf_strip = event_class(title = "Inspect her body!", start_label = "cc_pf_strip", start_tier = 2,
default cc_pf_strip = event_class(title = _("Inspect her body!"), start_label = "cc_pf_strip", start_tier = 2,
events = [
[
["cc_pf_strip_T2_intro_E1"],
@ -37,7 +37,7 @@ default cc_pf_strip = event_class(title = "Inspect her body!", start_label = "cc
iconset = [["heart_empty", "heart_red"], ["heart_empty", "heart_red"]]
)
default cc_pf_blowjob = event_class(title = "Suck it!", start_label = "cc_pf_blowjob", start_tier = 3,
default cc_pf_blowjob = event_class(title = _("Suck it!"), start_label = "cc_pf_blowjob", start_tier = 3,
events = [
[
["cc_pf_blowjob_T3_intro_E1"],

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
# Public requests
# cc_pr = Cho Chang Public Request
default cc_pr_spy_boys = event_class(title = "Spy on the boys!", start_label = "cc_pr_spy_boys_start", start_tier = 3,
default cc_pr_spy_boys = event_class(title = _("Spy on the boys!"), start_label = "cc_pr_spy_boys_start", start_tier = 3,
events = [
[
["cc_pr_spy_boys_T3_twins"],
@ -13,7 +13,7 @@ default cc_pr_spy_boys = event_class(title = "Spy on the boys!", start_label = "
iconset = [["star_empty", "star_yellow"]]
)
default cc_pr_manipulate_boys = event_class(title = "Manipulate the boys!", start_label = "cc_pr_manipulate_boys_start",
default cc_pr_manipulate_boys = event_class(title = _("Manipulate the boys!"), start_label = "cc_pr_manipulate_boys_start",
events = [
[
["cc_pr_manipulate_boys_T1_intro_E1"], ["cc_pr_manipulate_boys_T1_E1"],
@ -35,7 +35,7 @@ default cc_pr_manipulate_boys = event_class(title = "Manipulate the boys!", star
iconset = [["star_empty", "star_yellow"]] # You have to add icons at least for first tier, the rest will be copied over automatically.
)
default cc_pr_spy_girls = event_class(title = "Spy on the girls!", start_label = "cc_pr_spy_girls_start", start_tier = 3,
default cc_pr_spy_girls = event_class(title = _("Spy on the girls!"), start_label = "cc_pr_spy_girls_start", start_tier = 3,
events = [
[
["cc_pr_spy_girls_T3_showers"],
@ -48,7 +48,7 @@ default cc_pr_spy_girls = event_class(title = "Spy on the girls!", start_label =
iconset = [["star_empty", "star_yellow"]]
)
default cc_pr_manipulate_girls = event_class(title = "Manipulate the girls!", start_label = "cc_pr_manipulate_girls_start", start_tier = 3,
default cc_pr_manipulate_girls = event_class(title = _("Manipulate the girls!"), start_label = "cc_pr_manipulate_girls_start", start_tier = 3,
events = [
[
["cc_pr_manipulate_girls_T3_alicia"],

View File

@ -236,10 +236,10 @@ label update_cho_requests:
return
label favor_not_ready:
call nar(">You can't do this favour just yet.")
call nar(_(">You can't do this favour just yet."))
return
label not_available:
$ TBA_message("This feature is currently not available as of version %s." % config.version)
$ TBA_message(_("This feature is currently not available as of version %s." % config.version))
return

View File

@ -17,23 +17,23 @@ label cho_talk:
"\"-Address me only as-\"" if cho_quid.E1_complete:
menu:
"\"-Sir-\"":
$ cho_genie_name = "Sir"
$ cho_genie_name = _("Sir")
"\"-Dumbledore-\"":
$ cho_genie_name = "Dumbledore"
$ cho_genie_name = _("Dumbledore")
"\"-Professor-\"":
$ cho_genie_name = "Professor"
$ cho_genie_name = _("Professor")
"\"-Coach-\"":
$ cho_genie_name = "Coach"
$ cho_genie_name = _("Coach")
"\"-Sergeant-\"":
$ cho_genie_name = "Sergeant"
$ cho_genie_name = _("Sergeant")
"\"-Captain-\"":
$ cho_genie_name = "Captain"
$ cho_genie_name = _("Captain")
"\"-Old Man-\"":
$ cho_genie_name = "Old Man"
$ cho_genie_name = _("Old Man")
"\"-Daddy-\"" if cho_tier >= 4:
$ cho_genie_name = "Daddy"
$ cho_genie_name = _("Daddy")
"-Custom Input-":
$ cho_genie_name = renpy.input("(Please enter the name.)", cho_genie_name, ALLOWED_CHARACTERS, length=14).strip() or "Professor"
$ cho_genie_name = renpy.input(_("(Please enter the name.)"), cho_genie_name, ALLOWED_CHARACTERS, length=14).strip() or _("Professor")
"\"-Never mind-\"":
jump cho_talk
@ -42,25 +42,25 @@ label cho_talk:
"\"-From now on I will refer to you as-\"" if cho_quid.E1_complete:
menu:
"\"-Miss Chang-\"":
$ cho_name = "Miss Chang"
$ cho_name = _("Miss Chang")
"\"-Cho-\"":
$ cho_name = "Cho"
$ cho_name = _("Cho")
"\"-Cadet-\"":
$ cho_name = "Cadet"
$ cho_name = _("Cadet")
"\"-Pilot-\"":
$ cho_name = "Pilot"
$ cho_name = _("Pilot")
"\"-Maggot-\"":
$ cho_name = "Maggot"
$ cho_name = _("Maggot")
"\"-Tomboy-\"":
$ cho_name = "Tomboy"
$ cho_name = _("Tomboy")
"\"-Boy-\"":
$ cho_name = "Boy"
$ cho_name = _("Boy")
"\"-Champ-\"" if cho_tier >= 4:
$ cho_name = "Champ"
$ cho_name = _("Champ")
"\"-Slut-\"" if cho_tier >= 4:
$ cho_name = "Slut"
$ cho_name = _("Slut")
"-Custom Input-":
$ cho_name = renpy.input("(Please enter the name.)", cho_name, ALLOWED_CHARACTERS, length=14).strip() or "Miss Chang"
$ cho_name = renpy.input(_("(Please enter the name.)"), cho_name, ALLOWED_CHARACTERS, length=14).strip() or _("Miss Chang")
"\"-Never mind-\"":
jump cho_talk

View File

@ -34,11 +34,11 @@ default hufflepuff_match = "" # Dynamic string. Valid choices: 'start', 'ready',
default slytherin_match = "" # Dynamic string. Valid choices: 'start', 'ready', 'intro_done', 'completed', 'return'.
default gryffindor_match = "" # Dynamic string. Valid choices: 'start', 'ready', 'intro_done', 'completed', 'return'.
default cho_broom_name = "Purple Rocket"
default cho_broom_name = _("Purple Rocket")
# Names
default cho_genie_name = "Professor"
default cho_name = "Cho"
default tonks_cho_name = "Sweetie"
default cho_genie_name = _("Professor")
default cho_name = _("Cho")
default tonks_cho_name = _("Sweetie")
default gave_cho_gift = False

View File

@ -1,5 +1,5 @@
define character.genie_say = Character("Genie", show_icon="genie")
define character.genie_say = Character(_("Genie"), show_icon="genie")
init python:
def gen(what, face=None, xpos=None, ypos=None, pos=None, flip=None, trans=None, animation=False, **kwargs):

View File

@ -9,7 +9,7 @@ default genie_outfit = "robes"
# Flags
default genie_masturbating = False
default dumbledore_name = "Albus Dumbledore"
default dumbledore_name = _("Albus Dumbledore")
# Stats

View File

@ -334,7 +334,7 @@ label hermione_summon_setup:
elif her_mood >= 50:
her "I have nothing to tell you, sir!" ("mad", "narrow", "angry", "L", xpos="base", ypos="base", trans=d3)
call describe_mood("Hermione", her_mood)
call describe_mood(_("Hermione"), her_mood)
call tutorial("moodngifts")
else:
if game.daytime:

View File

@ -782,7 +782,7 @@ label hermione_helping_selling_cards:
gen "Sounds like you're doing a great job." ("base", xpos="far_left", ypos="head")
her "Thanks!" ("open","happy", cheeks="blush")
her "Here's your payment." ("open", "base", "base", "mid")
call give_reward("You have received twenty gold", "interface/icons/gold.webp")
call give_reward(_("You have received twenty gold"), "interface/icons/gold.webp")
$ game.gold += 20
gen "Well done [hermione_name], fifteen points to Gryffindor." ("base", xpos="far_left", ypos="head")
$ gryffindor += 15
@ -809,7 +809,7 @@ label hermione_helping_selling_cards:
her "I'm fine with them believing they had anything to do with it though." ("smile", "closed", "base", "mid")
gen "How noble of you..." ("base", xpos="far_left", ypos="head")
her "Here's your payment." ("open", "base", "base", "mid")
call give_reward("You have received twenty gold", "interface/icons/gold.webp")
call give_reward(_("You have received twenty gold"), "interface/icons/gold.webp")
$ game.gold += 20
gen "Well done [hermione_name], twenty points to Gryffindor." ("base", xpos="far_left", ypos="head")
$ gryffindor += 20
@ -848,7 +848,7 @@ label hermione_helping_selling_cards:
her "Thank you." ("annoyed", "happyCl", "base", "mid", cheeks="blush")
her "Anyway..." ("base", "base", "base", "mid")
her "Here's your payment." ("open", "base", "base", "mid")
call give_reward("You have received twenty gold", "interface/icons/gold.webp")
call give_reward(_("You have received twenty gold"), "interface/icons/gold.webp")
$ game.gold += 20
gen "Well done [hermione_name], twenty points to Gryffindor." ("base", xpos="far_left", ypos="head")
$ gryffindor += 20
@ -883,7 +883,7 @@ label hermione_helping_selling_cards:
her "Anyway..." ("normal", "base", "base", "mid")
her "glad you agree." ("base", "happy", "base", "mid_soft")
her "Here's your payment." ("open", "base", "base", "mid")
call give_reward("You have received twenty gold", "interface/icons/gold.webp")
call give_reward(_("You have received twenty gold"), "interface/icons/gold.webp")
$ game.gold += 20
gen "Well done [hermione_name], twenty points to Gryffindor." ("base", xpos="far_left", ypos="head")
$ gryffindor += 20
@ -912,7 +912,7 @@ label hermione_helping_selling_cards:
her "There's no conclusion to be made by just testing a theory once [genie_name]." ("normal", "closed", "angry", "mid")
her "Anyway..." ("open", "base", "base", "mid")
her "Here's your payment." ("open", "base", "base", "mid")
call give_reward("You have received twenty gold", "interface/icons/gold.webp")
call give_reward(_("You have received twenty gold"), "interface/icons/gold.webp")
$ game.gold += 20
gen "Well done [hermione_name], twenty-five points to Gryffindor." ("base", xpos="far_left", ypos="head")
$ gryffindor += 25

View File

@ -9,7 +9,7 @@ default her_ass_expand_no_clothes = False
label potion_ass_make:
call give_reward("You have successfully created a new potion!", ass_potion_ITEM)
call give_reward(_("You have successfully created a new potion!"), ass_potion_ITEM)
gen "There we go." ("base", xpos="far_left", ypos="head")
$ renpy.sound.play("sounds/sniff.ogg")

View File

@ -7,7 +7,7 @@ default her_breast_expand_pub_high_reputation_done = False
label potion_breast_make:
call give_reward("You have successfully created a new potion!", breast_potion_ITEM)
call give_reward(_("You have successfully created a new potion!"), breast_potion_ITEM)
gen "There we go." ("base", xpos="far_left", ypos="head")
$ renpy.sound.play("sounds/sniff.ogg")

Some files were not shown because too many files have changed in this diff Show More