Skip to content
Snippets Groups Projects
Commit f2fda7b6 authored by Fabian Heinrich's avatar Fabian Heinrich
Browse files

Added translations for recipe names.

parent cb5154e1
No related branches found
No related tags found
1 merge request!80Resolve "Configure displayed language"
......@@ -1126,8 +1126,13 @@ class PyGameGUI:
def update_postgame_screen(self, state):
score = state["score"]
# self.score_conclusion.set_text(f"Your final score is {score}. Hurray!")
self.score_conclusion.set_text("translations.final_score", text_kwargs={"score": str(score)})
self.level_name_label.set_text("translations.completed_level", text_kwargs={"level": str(self.level_info["name"])})
self.score_conclusion.set_text(
"translations.final_score", text_kwargs={"score": str(score)}
)
self.level_name_label.set_text(
"translations.completed_level",
text_kwargs={"level": str(self.level_info["name"])},
)
served_meals = state["served_meals"]
......@@ -1434,7 +1439,7 @@ class PyGameGUI:
(self.window_width / 5, height),
)
label = pygame_gui.elements.UILabel(
text=meal + ":",
text=f"translations.{meal}",
relative_rect=rect,
manager=self.manager,
container=container,
......@@ -1662,7 +1667,11 @@ class PyGameGUI:
"translations.bots_to_be_added",
text_kwargs={"number": str(self.number_bots_to_be_added)},
)
text = "translations.split_players_yes" if self.split_players else "translations.split_players_no"
text = (
"translations.split_players_yes"
if self.split_players
else "translations.split_players_no"
)
self.split_players_button.set_text(text)
if self.multiple_keysets:
......
......@@ -25,6 +25,14 @@
"next_game": "Nächstes Level",
"finish_study": "Studie Beenden",
"thank_you": "Vielen Dank an der Teilnahme!",
"signal_supervisor": "Bitte gib dem Studienteilnehmer Bescheid, dass die Studie vorbei ist."
"signal_supervisor": "Bitte gib dem Studienteilnehmer Bescheid, dass die Studie vorbei ist.",
"Tomato Soup": "Tomatensuppe:",
"Onion Soup": "Zwiebelsuppe:",
"Burger": "Burger:",
"Pizza": "Pizza:",
"Fish And Chips": "Fish and Chips:",
"Chips": "Pommes",
"Salad": "Salat:",
"Fried Fish": "Backfisch:"
}
}
\ No newline at end of file
......@@ -25,6 +25,14 @@
"next_game": "Next study",
"finish_study": " Finish study",
"thank_you": "Thank you for participating in this study!",
"signal_supervisor": " Please signal the study supervisor that the study is finished."
"signal_supervisor": " Please signal the study supervisor that the study is finished.",
"Tomato Soup": "Tomato Soup:",
"Onion Soup": "Onion Soup:",
"Burger": "Burger:",
"Pizza": "Pizza:",
"Fish And Chips": "Fish and Chips:",
"Chips": "Chips",
"Salad": "Salad:",
"Fried Fish": "Fried Fish:"
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment