add migration for transcription.language to general.language

This commit is contained in:
leonardotrapani
2026-02-01 13:44:12 +01:00
parent e46d8abe0d
commit 13b1de4e04
7 changed files with 241 additions and 14 deletions
+13 -1
View File
@@ -624,4 +624,16 @@ Started: Sun Feb 1 12:22:47 AM CET 2026
- Updated all Example Configurations with `[general]` section
- Added "Multilingual Setup with Specific Language" example
- Added Language Migration section explaining the change from transcription.language
- Typecheck passes
- Typecheck passes
### Task 13: Add migration for existing configs
- Added `migrateLanguageToGeneral()` method to Config in internal/config/load.go
- Logic: if transcription.language is set but general.language is empty, copies to general.language
- Logs "Config: migrated language setting to [general] section" when migration occurs
- Called in Load() after applyThreadsDefault()
- Migration is in-memory only - original file not modified until explicit save
- Added 3 comprehensive tests:
- old config with transcription.language='es' migrates to general.language='es'
- migration does not run when general.language already set
- original file not modified until explicit save
- All tests passing, typecheck passes