refactor: remove LocaleSwitcher component and update locale handling
- Removed LocaleSwitcher from NavUser, SiteHeader, and WorkbenchHeader components. - Updated tests to reflect the removal of LocaleSwitcher. - Changed default locale from "en-US" to "zh-CN" in i18n configuration. - Refactored locale resolution logic to read configured locale without relying on browser language detection. - Updated AgentDesk SDK to support language configuration from public API. - Cleaned up unused auth options fetching in the auth API.
This commit is contained in:
@@ -26,6 +26,7 @@ import (
|
||||
|
||||
func NewServer() (*gin.Engine, error) {
|
||||
cfg := config.Current()
|
||||
i18nx.SetDefaultLocale(cfg.LanguageOrDefault())
|
||||
|
||||
gin.SetMode(gin.ReleaseMode)
|
||||
printBanner()
|
||||
@@ -156,6 +157,7 @@ func addRouter(app *gin.Engine) {
|
||||
|
||||
apiGroup := app.Group("/api")
|
||||
apiGroup.GET("/health", api.Health)
|
||||
apiGroup.GET("/config", api.PublicConfig)
|
||||
registerApiAuthRoutes(apiGroup.Group("/auth"))
|
||||
registerApiChannelRoutes(apiGroup.Group("/channel"))
|
||||
registerApiCustomerRoutes(apiGroup.Group("/customer"))
|
||||
|
||||
Reference in New Issue
Block a user