feat: add Swiss German spelling option (ß → ss) to dictation settings#152
feat: add Swiss German spelling option (ß → ss) to dictation settings#152Nico-123456 wants to merge 8 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (13)
📝 WalkthroughWalkthroughThis PR adds Swiss German spelling support to the transcription dictation feature, allowing users to enable automatic replacement of the German sharp s character (ß) with double-s (ss) and its capital form (ẞ) with SS. The change flows from database schema through settings storage, API endpoints, transcription processing, user interface, and localization across five languages. ChangesSwiss German spelling dictation option
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Why
Swiss Standard German (Switzerland and Liechtenstein) does not use the sharp s at all — every ß is written ss (Strasse, gross, weiss). Today there is no way to get Swiss spelling out of Amical:
applyTextReplacements), and ß only ever appears inside a word, so aß → ssreplacement entry never fires. Adding every inflected ß word as a separate replacement doesn't scale.What
A new toggle in Settings → Dictation (Languages section): Swiss German spelling (ß → ss). Off by default.
When enabled,
ß/ẞare replaced withss/SSas a character-level post-processing pass:Implementation notes
applySwissGermanSpelling()inutils/text-replacement.ts, applied inapplyFormattingAndReplacements(covers bothfinalizeSessionandretryTranscription)dictation.swissGermanSpellingsetting (defaults tofalseeverywhere it's read, so no settings migration is needed)DictationSettingsSchema(tRPC) andSharedPipelineData.userPreferencesLanguageSettings.tsx, strings added for en/de/es/ja/zh-TWtests/utils/text-replacement.test.tsTesting
vitest: all 30 tests intext-replacement.test.tspass (25 existing + 5 new)Summary by CodeRabbit
Release Notes
New Features
Localization