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
+2 -8
View File
@@ -6,7 +6,6 @@ import (
"github.com/charmbracelet/huh"
"github.com/leonardotrapani/hyprvoice/internal/config"
"github.com/leonardotrapani/hyprvoice/internal/language"
)
// formatProvidersLabel formats the providers menu option
@@ -14,14 +13,9 @@ func formatProvidersLabel(cfg *config.Config) string {
return "Providers"
}
// formatLanguageMenuLabel formats the language menu option showing current setting
// formatLanguageMenuLabel formats the language menu option
func formatLanguageMenuLabel(cfg *config.Config) string {
langCode := cfg.General.Language
if langCode == "" {
return "Language (Auto-detect)"
}
lang := language.FromCode(langCode)
return fmt.Sprintf("Language (%s)", lang.Name)
return "Language"
}
// formatTranscriptionLabel formats the transcription menu option