Require capitalization and final punctuation again; add a UI reminder

Follow-up to the previous commit: testing further showed a missing
initial capital also fails validation, which raised the real
question (CLAUDE.md: ask rather than decide alone on an ambiguous
pedagogical point) — is sentence-initial capitalization and final
punctuation something the audio should convey, or a general writing
convention the child applies regardless of what they hear?

Decided: a general convention, like in a real classroom dictée. So
both stay required, and the terminal-punctuation tolerance added in
the previous commit is reverted (DictationAnalyzer back to comparing
the text as-is).

Since the audio still can't vocalize either rule, the child needs to
be told some other way: added a permanent reminder label to the
dictation scene ("N'oublie pas : une majuscule au début de la phrase
et un point à la fin !"), sourced from data/localization/fr.json.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Denis Defolie
2026-10-11 19:27:59 +02:00
parent 02755ced6f
commit 8a3469e7b1
8 changed files with 48 additions and 49 deletions
@@ -1,7 +1,8 @@
extends GutTest
## Reproduction d'un bug signale manuellement via exercise_host : la dictee
## "Les petits chats dorment." tapee exactement comme entendue n'etait pas
## validee comme correcte.
## Reproduction de deux retours de test manuel via exercise_host, sur la
## dictee "Les petits chats dorment." (voir docs/specs/decisions.md, points
## 21 et 22) : la reponse exacte doit valider, et la majuscule/le point final
## restent exiges (conventions generales d'ecriture, pas une tolerance).
var _profile_id: String = ""
@@ -30,10 +31,7 @@ func test_exact_target_text_is_validated_as_correct() -> void:
assert_eq(_feedback_title(host), UIText.get_text("feedback_panel.correct_title"))
## "J'entends parfaitement mais ne valide pas" : l'audio ne fait entendre
## aucune ponctuation, donc l'enfant qui ecrit exactement ce qu'il entend
## (sans le point final) doit tout de meme etre valide.
func test_missing_final_period_is_still_validated_as_correct() -> void:
func test_missing_final_period_is_not_validated_as_correct() -> void:
var host: Control = await _ready_host()
var exercise_scene: Control = host.get_node("%ExerciseContainer").get_child(0)
@@ -41,7 +39,7 @@ func test_missing_final_period_is_still_validated_as_correct() -> void:
exercise_scene.get_node("%ValidateButton").pressed.emit()
await wait_process_frames(1)
assert_eq(_feedback_title(host), UIText.get_text("feedback_panel.correct_title"))
assert_eq(_feedback_title(host), UIText.get_text("feedback_panel.incorrect_title"))
func _ready_host() -> Control: