Skip to content

Commit 64256d7

Browse files
author
LegrandNico
committed
[languages] : Fix and updates for the danish_children
1 parent 147982e commit 64256d7

File tree

2 files changed

+33
-31
lines changed

2 files changed

+33
-31
lines changed

cardioception/HRD/languages.py

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ def danish(device: str, setup: str, exteroception: bool) -> Dict[str, Collection
148148
"slower": "Langsommere",
149149
"faster": "Hurtigere",
150150
"checkOximeter": "Sørg venligst for at pulsoximeteret sidder rigtigt på din finger.",
151-
"stayStill": "Sid venglist rogligt under målingen",
151+
"stayStill": "Sid venligst roligt under målingen",
152152
"tooLate": "For langsomt",
153153
"correctResponse": "Rigtigt",
154154
"incorrectResponse": "Forkert",
@@ -254,7 +254,8 @@ def danish(device: str, setup: str, exteroception: bool) -> Dict[str, Collection
254254
def danish_children(
255255
device: str, setup: str, exteroception: bool
256256
) -> Dict[str, Collection[str]]:
257-
"""Create the text dictionary with instruction in Danish
257+
"""Create the text dictionary with instruction in Danish (simplified version for
258+
children).
258259
259260
Parameters
260261
----------
@@ -277,11 +278,11 @@ def danish_children(
277278
"slower": "Langsommere",
278279
"faster": "Hurtigere",
279280
"checkOximeter": "Spørg forskningsassistensen om, hvordan du skal placere fingerklemmen.",
280-
"stayStill": "Sid venglist rogligt under målingen",
281+
"stayStill": "Sid venligst roligt under målingen",
281282
"tooLate": "For langsomt",
282283
"correctResponse": "Rigtigt",
283284
"incorrectResponse": "Forkert",
284-
"VASlabels": ["Gæt", "Helt sikker"],
285+
"VASlabels": ["Slet ikke sikker", "Helt sikker"],
285286
"textHeartListening": "Mærk din indre puls",
286287
"textToneListening": "Lyt til tonerne",
287288
"textTaskStart": "Opgaven begynder nu, gør dig klar.",
@@ -306,28 +307,28 @@ def danish_children(
306307

307308
texts[
308309
"Tutorial1"
309-
] = """Instruktion
310+
] = """Instruktion 1
310311
"""
311312
texts["pulseTutorial1"] = "Udstyr."
312313

313-
texts["pulseTutorial2"] = "Udstyr."
314+
texts["pulseTutorial2"] = ""
314315

315-
texts["pulseTutorial3"] = "Udstyr."
316+
texts["pulseTutorial3"] = ""
316317

317318
texts[
318319
"pulseTutorial4"
319320
] = "Indtast venligt nummeret på den finger som du besluttede at placere fingerklemmen på."
320321

321322
texts[
322323
"Tutorial2"
323-
] = "Når du ser dette ikon, forsøg da at fokusere på indre puls i 5 sekunder. Prøv ikke at bevæge dig, da vi måler din puls i dette tidsrum"
324+
] = "Når du ser dette ikon, forsøg da at fokusere på din indre puls i 5 sekunder. Prøv ikke at bevæge dig, da vi måler din puls i dette tidsrum"
324325

325326
moreResp = "OP tasten" if device == "keyboard" else "HØJRE mussetast"
326327
lessResp = "NED tasten" if device == "keyboard" else "VENSTRE mussetast"
327328
texts[
328329
"Tutorial3_icon"
329330
] = """Efter du har forsøgt at mærke din indre puls, vil du se det samme ikon og høre en række bib-lyde."""
330-
texts["Tutorial3_responses"] = """Instruktion"""
331+
texts["Tutorial3_responses"] = """Instruktion 2"""
331332

332333
if exteroception is True:
333334
texts[
@@ -342,9 +343,9 @@ def danish_children(
342343
343344
Det andet sæt af bib-lyde vil ALTID være langsommere eller hurtigere end det første sæt. Gæt venligst selvom du er usikker."""
344345

345-
texts["Tutorial4"] = """Instruktion."""
346+
texts["Tutorial4"] = """Instruktion 3"""
346347

347-
texts["Tutorial5"] = """Instruktion."""
348+
texts["Tutorial5"] = """Instruktion 4"""
348349

349350
texts[
350351
"Tutorial6"

cardioception/HRD/task.py

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ def run(
212212
parameters["win"],
213213
height=parameters["textSize"],
214214
pos=(0.0, 0.2),
215-
text=f"You completed {percRemain} % of the task.",
215+
text=f" ---- {percRemain} % ---- ",
216216
)
217217
remain.draw()
218218
message.draw()
@@ -733,26 +733,27 @@ def tutorial(parameters: dict):
733733

734734
waitInput(parameters)
735735

736-
# Get finger number
737-
pulse2 = visual.TextStim(
738-
parameters["win"],
739-
height=parameters["textSize"],
740-
pos=(0.0, 0.2),
741-
text=parameters["texts"]["pulseTutorial2"],
742-
)
743-
pulse3 = visual.TextStim(
744-
parameters["win"],
745-
height=parameters["textSize"],
746-
pos=(0.0, -0.2),
747-
text=parameters["texts"]["pulseTutorial3"],
748-
)
749-
pulse2.draw()
750-
pulse3.draw()
751-
press.draw()
752-
parameters["win"].flip()
753-
core.wait(1)
736+
# Get finger number - Skip this part for the danish_children version (empty string)
737+
if parameters["texts"]["pulseTutorial2"]:
738+
pulse2 = visual.TextStim(
739+
parameters["win"],
740+
height=parameters["textSize"],
741+
pos=(0.0, 0.2),
742+
text=parameters["texts"]["pulseTutorial2"],
743+
)
744+
pulse3 = visual.TextStim(
745+
parameters["win"],
746+
height=parameters["textSize"],
747+
pos=(0.0, -0.2),
748+
text=parameters["texts"]["pulseTutorial3"],
749+
)
750+
pulse2.draw()
751+
pulse3.draw()
752+
press.draw()
753+
parameters["win"].flip()
754+
core.wait(1)
754755

755-
waitInput(parameters)
756+
waitInput(parameters)
756757

757758
pulse4 = visual.TextStim(
758759
parameters["win"],

0 commit comments

Comments
 (0)