From 57473ec3c6b36f109f8329577ec89f44be0737be Mon Sep 17 00:00:00 2001 From: Finessse Date: Thu, 18 Dec 2025 18:25:06 +0700 Subject: [PATCH] proxypilot: default management UI language to en --- internal/api/server.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/internal/api/server.go b/internal/api/server.go index a025b2a1..04b642d3 100644 --- a/internal/api/server.go +++ b/internal/api/server.go @@ -624,6 +624,13 @@ func (s *Server) serveManagementControlPanel(c *gin.Context) { html = strings.ReplaceAll(html, `alt:"CPAMC logo"`, `alt:"ProxyPilot logo"`) html = strings.ReplaceAll(html, `alt:"CLI Proxy API Management Center"`, `alt:"ProxyPilot Dashboard"`) + // The upstream management bundle currently defaults to zh-CN for some users/environments. + // Force a sane default (English) unless the user has already explicitly chosen a language. + const langBootstrap = `` + if strings.Contains(html, "") { + html = strings.Replace(html, "", "\n"+langBootstrap+"\n", 1) + } + c.Header("Content-Type", "text/html; charset=utf-8") c.String(http.StatusOK, html) }