Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
171 changes: 77 additions & 94 deletions web/src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,19 @@
"reset": "Reset",
"import": "Import",
"export": "Export",
"refresh": "Refresh"
"refresh": "Refresh",
"copy": "Copy",
"copied": "Copied",
"saving": "Saving...",
"saved": "Saved",
"clientType": "Client Type",
"default": "Default",
"deleting": "Deleting...",
"updating": "Updating...",
"day": "day",
"days": "days",
"global": "Global",
"initFailed": "Failed to Initialize"
},
"nav": {
"dashboard": "Dashboard",
Expand Down Expand Up @@ -98,7 +110,21 @@
"failed": "Failed",
"cancelled": "Cancelled",
"rejected": "Rejected"
}
},
"requestId": "Request #${id}",
"noRequestData": "No request data available",
"noResponseData": "No response data available",
"noAttempts": "No attempts available",
"tabs": {
"request": "Request",
"response": "Response",
"metadata": "Metadata"
},
"selectAttempt": "Select an attempt to view details",
"attemptId": "Attempt #${id}",
"compareHeaders": "Compare Headers - Client vs Upstream",
Comment on lines +114 to +125
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

cd web && wc -l src/locales/en.json

Repository: awsl-project/maxx

Length of output: 84


🏁 Script executed:

cd web && sed -n '114,125p' src/locales/en.json

Repository: awsl-project/maxx

Length of output: 503


🏁 Script executed:

cd web && rg '\{\{.*?\}\}|\$\{.*?\}' src/locales/en.json -o | head -30

Repository: awsl-project/maxx

Length of output: 278


🏁 Script executed:

cd web && cat package.json | grep -A 5 '"i18n\|vue-i18n\|translations'

Repository: awsl-project/maxx

Length of output: 227


🏁 Script executed:

cd web && head -150 src/locales/en.json | tail -50

Repository: awsl-project/maxx

Length of output: 1882


插值格式不一致且与 i18next 不兼容

requestIdattemptId 使用了 ${id} 格式,但项目使用 i18next(^25.7.4),其标准插值语法为 {{variable}}。当前格式会原样显示,而不会被实际值替换。文件中其他插值全部使用正确的 {{}} 格式。

需要将这两处更改为 {{id}}

修复方案
-    "requestId": "Request #${id}",
+    "requestId": "Request #{{id}}",
...
-    "attemptId": "Attempt #${id}",
+    "attemptId": "Attempt #{{id}}",
🤖 Prompt for AI Agents
In `@web/src/locales/en.json` around lines 114 - 125, The keys requestId and
attemptId use JS-template style "${id}" which i18next won't interpolate; update
their values to use i18next interpolation "{{id}}" so translations render
correctly (change the string for "requestId" from "Request #${id}" to "Request
#{{id}}" and for "attemptId" from "Attempt #${id}" to "Attempt #{{id}}").

"compareBody": "Compare Body - Client vs Upstream",
"clientRequest": "Client Request"
},
"providers": {
"title": "Providers",
Expand All @@ -123,7 +149,16 @@
"manage": "Manage",
"projectInfo": "Project Information",
"slug": "Slug",
"slugPlaceholder": "project-slug"
"slugPlaceholder": "project-slug",
"information": "Project Information",
"proxyConfig": "Proxy Configuration",
"name": "Name",
"slugDesc": "Used in URLs and proxy paths",
"baseUrl": "Base URL:",
"updated": "Updated:",
"saveChanges": "Save Changes",
"copyUrl": "Copy URL",
"proxyConfigDesc": "Use this base URL to route requests through this project's configuration. The protocol (Claude, OpenAI, Gemini) is automatically detected."
},
"routes": {
"title": "Global Routes",
Expand All @@ -137,7 +172,31 @@
"id": "ID",
"client": "Client",
"provider": "Provider",
"position": "Position"
"position": "Position",
"form": {
"clientType": "Client Type",
"provider": "Provider",
"project": "Project",
"position": "Position (lower = higher priority)",
"modelMapping": "Model Mapping (Override)",
"enabled": "Enabled",
"selectProvider": "Select provider...",
"globalProjects": "Global (All Projects)",
"modelMappingHelp": "Route-level model mappings take priority over provider and global settings."
},
"modelMapping": {
"requestModel": "Request Model",
"mappedModel": "Mapped Model",
"addMapping": "Add Mapping"
},
"update": "Update",
"create": "Create",
"customRoutes": "Custom Routes",
"usingGlobalRoutes": "Using global routes",
"customRoutesDisabled": "Custom Routes Disabled",
"usingGlobalRoutesDesc": "{{client}} is currently using global routes. Toggle switch to enable project-specific routing for this client type.",
"routesConfigured_one": "1 route configured for this project",
"routesConfigured_other": "{{count}} routes configured for this project"
},
"console": {
"title": "Console",
Expand All @@ -161,7 +220,16 @@
"projectBinding": "Project Binding",
"projectBindingHint": "Changing the project will also update all requests associated with this session.",
"updatedRequests": "Updated {{count}} requests",
"updateFailed": "Failed to update session project"
"updateFailed": "Failed to update session project",
"projectSessions": "Project Sessions",
"id": "ID",
"clientType": "Client Type",
"created": "Created",
"selectProject": "Select Project",
"session": "Session",
"remaining": "Remaining",
"noProjectsAvailable": "No projects available. Please create a project first.",
"projectSelectionRequired": "Project Selection Required"
},
"retryConfigs": {
"title": "Retry Policy",
Expand Down Expand Up @@ -203,7 +271,10 @@
"addStrategy": "Add Strategy",
"editStrategy": "Edit Strategy",
"newStrategy": "New Strategy",
"deleteConfirm": "Are you sure you want to delete this strategy?"
"deleteConfirm": "Are you sure you want to delete this strategy?",
"weightedRandom": "Weighted Random",
"priority": "Priority",
"allStrategies": "All Strategies"
},
"settings": {
"title": "Settings",
Expand Down Expand Up @@ -347,48 +418,6 @@
"forceThawWarning": "Force thawing may cause requests to fail again if the root cause is not resolved.",
"disabling": "Disabling..."
},
"routes": {
"form": {
"clientType": "Client Type",
"provider": "Provider",
"project": "Project",
"position": "Position (lower = higher priority)",
"modelMapping": "Model Mapping (Override)",
"enabled": "Enabled",
"selectProvider": "Select provider...",
"globalProjects": "Global (All Projects)",
"modelMappingHelp": "Route-level model mappings take priority over provider and global settings."
},
"modelMapping": {
"requestModel": "Request Model",
"mappedModel": "Mapped Model",
"addMapping": "Add Mapping"
},
"update": "Update",
"create": "Create",
"customRoutes": "Custom Routes",
"usingGlobalRoutes": "Using global routes",
"customRoutesDisabled": "Custom Routes Disabled",
"usingGlobalRoutesDesc": "{{client}} is currently using global routes. Toggle switch to enable project-specific routing for this client type.",
"routesConfigured_one": "1 route configured for this project",
"routesConfigured_other": "{{count}} routes configured for this project"
},
"requests": {
"requestId": "Request #${id}",
"noRequestData": "No request data available",
"noResponseData": "No response data available",
"noAttempts": "No attempts available",
"tabs": {
"request": "Request",
"response": "Response",
"metadata": "Metadata"
},
"selectAttempt": "Select an attempt to view details",
"attemptId": "Attempt #${id}",
"compareHeaders": "Compare Headers - Client vs Upstream",
"compareBody": "Compare Body - Client vs Upstream",
"clientRequest": "Client Request"
},
"models": {
"searchPlaceholder": "Search or enter custom model...",
"select": "Select Model"
Expand All @@ -408,38 +437,6 @@
"toggleSidebar": "Toggle Sidebar",
"close": "Close"
},
"routingStrategies": {
"weightedRandom": "Weighted Random",
"priority": "Priority",
"allStrategies": "All Strategies"
},
"projects": {
"information": "Project Information",
"proxyConfig": "Proxy Configuration",
"slug": "Slug",
"name": "Name",
"slugPlaceholder": "project-slug",
"slugDesc": "Used in URLs and proxy paths",
"baseUrl": "Base URL:",
"created": "Created:",
"updated": "Updated:",
"saveChanges": "Save Changes",
"copyUrl": "Copy URL",
"proxyConfigDesc": "Use this base URL to route requests through this project's configuration. The protocol (Claude, OpenAI, Gemini) is automatically detected."
},
"sessions": {
"projectSessions": "Project Sessions",
"description": "Active sessions using this project's configuration",
"id": "ID",
"sessionId": "Session ID",
"clientType": "Client Type",
"created": "Created",
"selectProject": "Select Project",
"session": "Session",
"remaining": "Remaining",
"noProjectsAvailable": "No projects available. Please create a project first.",
"projectSelectionRequired": "Project Selection Required"
},
"modelInput": {
"selectOrEnter": "Select or enter model...",
"searchOrEnter": "Search or enter custom model...",
Expand All @@ -450,19 +447,5 @@
"pressToUse": "Press {{key}} to use custom model name",
"toUseCustomModel": "use custom model name",
"banned": "Banned"
},
"common": {
"copy": "Copy",
"copied": "Copied",
"saving": "Saving...",
"saved": "Saved",
"clientType": "Client Type",
"default": "Default",
"deleting": "Deleting...",
"updating": "Updating...",
"day": "day",
"days": "days",
"global": "Global",
"initFailed": "Failed to Initialize"
}
}
Loading