cardioception.HRD.languages.get_texts#

cardioception.HRD.languages.get_texts(language, device, exteroception, texts_dir=None, required=None)[source]#

Every string this session will show the participant.

Parameters
language

A filename stem in texts/. available() lists them.

device

"keyboard" or "mouse". Selects the wording of the response instructions, which name the actual keys or buttons.

exteroception

Whether the session includes the exteroceptive condition, which changes what the tutorial says is coming.

texts_dir

The directory holding the language files. Defaults to TEXTS_DIR, read when this is called.

required

The keys every language must define. Defaults to REQUIRED_KEYS, read when this is called.

Raises
ValueError

If the language does not exist, or its file is missing a key. Both are raised here, at setup, rather than at the screen that needed the text.