summaryrefslogtreecommitdiff
path: root/internal/processor
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-04-01 14:14:19 +0300
committerPaul Buetow <paul@buetow.org>2026-04-01 14:14:19 +0300
commitbcdda1dcdff6afa42c3bf81b40413c2e6967ddc7 (patch)
tree420c3dde87aacc6278d34cb194ba16f36f26e337 /internal/processor
parenta892b4913c233d0ef85dd67e3d1c415e383bd6fd (diff)
zt: route GUI translations through shared translator
Diffstat (limited to 'internal/processor')
-rw-r--r--internal/processor/processor.go13
1 files changed, 7 insertions, 6 deletions
diff --git a/internal/processor/processor.go b/internal/processor/processor.go
index 5792119..dd49c2b 100644
--- a/internal/processor/processor.go
+++ b/internal/processor/processor.go
@@ -543,12 +543,13 @@ func (p *Processor) GenerateAnkiFile() (string, error) {
func (p *Processor) RunGUIMode() error {
// Create GUI configuration from command line flags and viper config
guiConfig := &gui.Config{
- AudioFormat: p.flags.AudioFormat,
- ImageProvider: p.flags.ImageAPI,
- OpenAIKey: cli.GetOpenAIKey(),
- GoogleAPIKey: cli.GetGoogleAPIKey(),
- PhoneticProvider: phonetic.Provider(viper.GetString("phonetic.provider")),
- AutoPlay: !p.flags.NoAutoPlay, // Invert the flag (--no-auto-play disables auto-play)
+ AudioFormat: p.flags.AudioFormat,
+ ImageProvider: p.flags.ImageAPI,
+ OpenAIKey: cli.GetOpenAIKey(),
+ GoogleAPIKey: cli.GetGoogleAPIKey(),
+ TranslationProvider: translation.Provider(viper.GetString("translation.provider")),
+ PhoneticProvider: phonetic.Provider(viper.GetString("phonetic.provider")),
+ AutoPlay: !p.flags.NoAutoPlay, // Invert the flag (--no-auto-play disables auto-play)
}
// Only set OutputDir if it was explicitly provided via flag