add effective language resolution for general.language support

This commit is contained in:
leonardotrapani
2026-02-01 13:16:24 +01:00
parent da8a1e5b0e
commit 7a3e590977
4 changed files with 75 additions and 2 deletions
+8
View File
@@ -512,4 +512,12 @@ Started: Sun Feb 1 12:22:47 AM CET 2026
- Added `General GeneralConfig` field to Config struct with toml tag 'general'
- Language field has ISO 639-1 code comment, empty for auto-detect
- TranscriptionConfig.Language kept for backwards compat (will be used as override)
- All tests passing, typecheck passes
### Task 48: Update config loading to handle general language
- Added `resolveEffectiveLanguage()` method to Config in convert.go
- Logic: transcription.language overrides general.language if set
- Updated `ToTranscriberConfig()` to use `resolveEffectiveLanguage()`
- Note: TOML loading already works automatically via struct tags (no load.go changes needed)
- Added 3 tests in config_test.go: only general set, transcription overrides general, neither set (auto)
- All tests passing, typecheck passes