mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-25 03:10:08 +08:00
refactor(oauth): update language retrieval in OAuth callback
- Replaced the configManager.getLanguage() method with getAppLanguage() for improved language handling. - Adjusted imports to reflect the new language utility structure.
This commit is contained in:
parent
30947c6bc1
commit
4407c0f675
@ -1,6 +1,5 @@
|
||||
import { loggerService } from '@logger'
|
||||
import { configManager } from '@main/services/ConfigManager'
|
||||
import { locales } from '@main/utils/locales'
|
||||
import { getAppLanguage, locales } from '@main/utils/language'
|
||||
import type EventEmitter from 'events'
|
||||
import http from 'http'
|
||||
import { URL } from 'url'
|
||||
@ -10,7 +9,7 @@ import type { OAuthCallbackServerOptions } from './types'
|
||||
const logger = loggerService.withContext('MCP:OAuthCallbackServer')
|
||||
|
||||
function getTranslation(key: string): string {
|
||||
const language = configManager.getLanguage()
|
||||
const language = getAppLanguage()
|
||||
const localeData = locales[language]
|
||||
|
||||
if (!localeData) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user