Copilot commented on code in PR #702:
URL: https://github.com/apache/shenyu-dashboard/pull/702#discussion_r4240898240


##########
src/routes/Plugin/McpServer/McpConfigModal.js:
##########
@@ -72,8 +72,8 @@ class McpConfigModal extends Component {
       const sseKey = `shenyu-mcp-sse-${selectorName}`;
       mcpServers[sseKey] = {
         url: `${selectorUrl}/sse`,
-        name: `${selectorName}服务sse`,
-        description: `${selectorName}服务测试sse - ${selectorDescription}`,
+        name: 
`${selectorName}${getIntlContent("SHENYU.MCP.CONFIG.NAME.SERVICE.SSE")}`,
+        description: 
`${selectorName}${getIntlContent("SHENYU.MCP.CONFIG.DESC.SERVICE.SSE")} - 
${selectorDescription}`,

Review Comment:
   These translations are evaluated only when `generateConfigs()` writes the 
generated config into state. A locale switch rerenders the connected parent, 
but this modal's `componentDidUpdate` regenerates only when `selectorList` 
changes, so the preview and copied `name`/`description` stay in the old 
language until another input changes. Regenerate on the locale signal or derive 
these localized fields during render/copy.



##########
src/locales/en-US.json:
##########
@@ -672,5 +672,53 @@
   "APIPROXY.APIKEY.USAGE.LINE1": "Proxy API Key works at selector granularity. 
Add header X-API-KEY: <proxyApiKey>; this check has the highest priority.",
   "APIPROXY.APIKEY.USAGE.LINE2": "The realApiKey is strongly bound to the 
selector configuration. To change the mapping between proxyApiKey and 
realApiKey, edit the selector configuration.",
   "APIPROXY.APIKEY.USAGE.HINT": "How to use: Add this API Key to the X-API-KEY 
field in your request header.",
-  "APIPROXY.APIKEY.PROXY_ENABLED_REQUIRED": "Please set proxyEnabled to 
\"true\" in this selector's configuration before entering Proxy API Key 
Management."
+  "APIPROXY.APIKEY.PROXY_ENABLED_REQUIRED": "Please set proxyEnabled to 
\"true\" in this selector's configuration before entering Proxy API Key 
Management.",
+  "SHENYU.SYSTEM.ALERT.LABELS.NAME": "Name",
+  "SHENYU.SYSTEM.ALERT.LABELS.VALUE": "Value",
+  "SHENYU.COMMON.SAVE": "Save",
+  "SHENYU.SYSTEM.DESCRIBE": "Description",
+  "SHENYU.COMMON.BACK": "Back",
+  "SHENYU.REQUEST.ERROR": "Request error",
+  "SHENYU.REQUEST.STATUS.200": "The server successfully returned the requested 
data.",
+  "SHENYU.REQUEST.STATUS.201": "New or modified data succeeded.",
+  "SHENYU.REQUEST.STATUS.202": "A request has entered the background queue 
(async task).",
+  "SHENYU.REQUEST.STATUS.204": "Data deleted successfully.",
+  "SHENYU.REQUEST.STATUS.400": "The request has an error, and the server did 
not create or modify data.",
+  "SHENYU.REQUEST.STATUS.401": "The user does not have permission (token, 
username, or password error).",
+  "SHENYU.REQUEST.STATUS.403": "The user is authorized, but access is 
forbidden.",
+  "SHENYU.REQUEST.STATUS.404": "The request targets a record that does not 
exist, and the server performed no operation.",
+  "SHENYU.REQUEST.STATUS.406": "The requested format is not available.",
+  "SHENYU.REQUEST.STATUS.410": "The requested resource has been permanently 
deleted and will not be available again.",
+  "SHENYU.REQUEST.STATUS.422": "A validation error occurred when creating an 
object.",
+  "SHENYU.REQUEST.STATUS.500": "A server error occurred, please check the 
server.",
+  "SHENYU.REQUEST.STATUS.502": "Gateway error.",
+  "SHENYU.REQUEST.STATUS.503": "Service unavailable, the server is temporarily 
overloaded or under maintenance.",
+  "SHENYU.REQUEST.STATUS.504": "Gateway timeout.",
+  "SHENYU.DOWNLOAD.FILE.FAILED": "Failed to download file",
+  "SHENYU.MCP.CONFIG.GATEWAY.TITLE": "Gateway Address Configuration:",
+  "SHENYU.MCP.CONFIG.GATEWAY.PLACEHOLDER": "Enter a custom gateway address, 
e.g.: http://localhost:9195 (leave empty to use the default)",
+  "SHENYU.MCP.CONFIG.GATEWAY.CURRENT": "Currently using:",
+  "SHENYU.MCP.CONFIG.SELECTOR.ENABLED": " (Enabled)",
+  "SHENYU.MCP.CONFIG.SELECTOR.DISABLED": " (Disabled)",
+  "SHENYU.MCP.CONFIG.BASE.PATH": "Base Path:",
+  "SHENYU.MCP.CONFIG.URL.EXPLAIN": "Final URL = Gateway Address + Base Path + 
Protocol Suffix (/sse or /streamablehttp)",
+  "SHENYU.MCP.CONFIG.NAME.SERVICE.SSE": " Service SSE",
+  "SHENYU.MCP.CONFIG.NAME.SERVICE": " Service",
+  "SHENYU.MCP.CONFIG.DESC.SERVICE.SSE": " Service SSE Test",
+  "SHENYU.MCP.CONFIG.DESC.SERVICE": " Service Test",
+  "SHENYU.MCP.CONFIG.DEFAULT.SERVICE.NAME": "Default MCP Service",
+  "SHENYU.MCP.TOOLS.PARAM.DEPTH.EXCEEDED": "Parameter nesting depth exceeds 
the limit",
+  "SHENYU.MCP.TOOLS.PARAM.DEPTH.MAX.PREFIX": " (max ",
+  "SHENYU.MCP.TOOLS.PARAM.DEPTH.MAX.SUFFIX": " levels)",
+  "SHENYU.MCP.TOOLS.PARAM.DEPTH.MAX.REACHED": "Maximum nesting depth limit 
reached",
+  "SHENYU.MCP.TOOLS.PARAM.DEPTH.MAX.CANNOT.ADD": ", cannot add more 
sub-parameters",
+  "SHENYU.MCP.TOOLS.PARAM.ROW.PREFIX": "Row ",
+  "SHENYU.MCP.TOOLS.PARAM.ROW.SUFFIX": "",
+  "SHENYU.MCP.TOOLS.PARAM.INCOMPLETE": "parameters incomplete, please fill in 
the name and type",

Review Comment:
   The composed English message is missing a verb and forms a comma splice (for 
example, “Row 1 parameters incomplete, please…”). Use “parameters are 
incomplete; please fill in the name and type” so the validation text is 
grammatical.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to