feat: Add inline numbers to typing lessons (#293)#571
Open
Dronakurl wants to merge 8 commits into
Open
Conversation
Add a new text mangling option that inserts random numbers (1-2000) between words at a configurable probability. Changes: - Add textNumbers setting to lessonProps - Add numbers slider UI to practice settings - Modify mangledWords to support withNumbers parameter - Pass withNumbers setting from guided lesson generator Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Run translation extraction to add missing translation strings for the numbers option in guided lessons. This fixes the issue where the numbers slider showed translation key IDs instead of proper labels. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add withNumbers parameter to WordListLesson.mangledWords() call - Modify mangledWords() to insert numbers between words using pending word state - Add test coverage for numbers in both GuidedLesson and WordListLesson - Add explanatory comments for the pending word pattern This addresses the maintainer review feedback about numbers replacing words. Now all words are preserved and numbers are inserted between them. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Translate "t_Add_numbers:" and "settings.numbers.description" to all 47 supported languages using the generic translation script. Languages translated: af, ar, bg, bn, ca, cs, da, de, el, en, eo, es, et, fa, fi, fo, fr, ga, he, hr, hu, id, is, it, ja, ko, lt, mn, nb, ne, nl, pl, pt-br, pt-pt, ro, ru, sk, sl, sq, sv, th, tr, uk, vi, zh-hans, zh-hant, zh-tw Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
….numbers.description
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add the option to insert numbers between words in typing lessons at a configurable frequency.
Related Issue
Implements #293
Changes
Modified Files
packages/keybr-lesson/lib/guided.ts- PasswithNumberssetting to lesson generatorpackages/keybr-lesson/lib/wordlist.ts- PasswithNumberssetting to lesson generatorpackages/keybr-lesson/lib/settings.ts- AddtextNumberspropertypackages/keybr-lesson/lib/text/words.ts- Add numbers insertion logic (inserts between words, not replacing)packages/page-practice/lib/settings/lesson/TextManglingProp.tsx- Add numbers slider UINew Files
packages/keybr-lesson/lib/guided.test.ts- Add test for numbers in GuidedLessonpackages/keybr-lesson/lib/wordlist.test.ts- Add test for numbers in WordListLessonHow It Works
lesson.textNumbersTesting
Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com