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
38 changes: 24 additions & 14 deletions src/components/top-navigation/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
MenuOutlined,
SettingOutlined,
TeamOutlined,
ThunderboltOutlined,
UserOutlined,
} from '@ant-design/icons';
import { Badge, Drawer, Menu, Tag } from 'antd';
Expand Down Expand Up @@ -110,20 +111,29 @@ export default function TopNavigation({
),
},
{
key: 'api-tokens',
icon: <KeyOutlined />,
label: (
<Link to={rootRouterPath.apiTokens}>{t('nav.api_tokens')}</Link>
),
},
{
key: 'mcp-connections',
icon: <ApiOutlined />,
label: (
<Link to={rootRouterPath.mcpConnections}>
{t('nav.mcp_connections')}
</Link>
),
key: 'automation',
icon: <ThunderboltOutlined />,
label: t('nav.automation'),
children: [
{
key: 'api-tokens',
icon: <KeyOutlined />,
label: (
<Link to={rootRouterPath.apiTokens}>
{t('nav.api_tokens')}
</Link>
),
},
{
key: 'mcp-connections',
icon: <ApiOutlined />,
label: (
<Link to={rootRouterPath.mcpConnections}>
{t('nav.mcp_connections')}
</Link>
),
},
],
},
{
key: 'members',
Expand Down
3 changes: 3 additions & 0 deletions src/components/top-navigation/nav-items.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,9 @@ export function getSelectedKeys(pathname: string) {
if (pathname === rootRouterPath.apiTokens) {
return ['api-tokens'];
}
if (pathname === rootRouterPath.mcpConnections) {
return ['mcp-connections'];
}
if (pathname === rootRouterPath.members) {
return ['members'];
}
Expand Down
39 changes: 20 additions & 19 deletions src/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -220,13 +220,13 @@
"key_pending": "App Key pending"
},
"api_tokens": {
"create_success": "API Token created successfully",
"create_success": "API Key created successfully",
"create_failed": "Failed to create",
"revoke_success": "Token revoked",
"revoke_success": "API Key revoked",
"revoke_failed": "Failed to revoke",
"col_id": "ID",
"col_name": "Name",
"col_token": "Token",
"col_token": "API Key",
"col_permissions": "Permissions",
"col_expires": "Expires",
"col_last_used": "Last Used",
Expand All @@ -239,19 +239,19 @@
"perm_delete": "Delete",
"never": "Never",
"never_used": "Never",
"revoke_title": "Revoke this token?",
"revoke_desc": "This token will no longer be usable. Are you sure?",
"revoke_title": "Revoke this API key?",
"revoke_desc": "This API key will no longer be usable. Are you sure?",
"yes": "Yes",
"no": "Cancel",
"revoke_button": "Revoke",
"title": "API Tokens",
"description_prefix": "API Tokens can be used for CI/CD or automation scripts to call the ",
"title": "API Keys",
"description_prefix": "API Keys can be used for CI/CD or automation scripts to call the ",
"pushy_api": "Pushy API",
"description_suffix": ". Each user can have up to 10 active tokens.",
"create_token": "Create Token",
"create_modal_title": "Create API Token",
"token_name": "Token Name",
"token_name_required": "Please enter a token name",
"description_suffix": ". Each user can have up to 10 active API keys.",
"create_token": "Create API Key",
"create_modal_title": "Create API Key",
"token_name": "Name",
"token_name_required": "Please enter a name",
"token_name_placeholder": "e.g., CI/CD Pipeline",
"permissions": "Permissions",
"permissions_required": "Please select at least one permission",
Expand All @@ -266,11 +266,11 @@
"exp_180": "180 days",
"exp_360": "360 days",
"create_button": "Create",
"created_title": "Token Created Successfully",
"created_title": "API Key Created Successfully",
"created_ok": "I've saved it",
"created_warning": "⚠️ Copy and save this token now. You won't be able to view it again!",
"created_warning": "⚠️ Copy and save this API key now. You won't be able to view it again!",
"copied": "Copied to clipboard",
"copy_button": "Copy Token",
"copy_button": "Copy API Key",
"mode": "Permission mode",
"mode_classic": "Classic (by method)",
"mode_scoped": "Fine-grained (by action)",
Expand All @@ -284,7 +284,7 @@
"scope_version_publish": "Publish/rollback/bind",
"scope_version_delete": "Delete versions/packages",
"col_apps": "App scope",
"apps_hint": "Empty = all apps; when set, the token can only operate on the selected apps (recommended for per-app CI)",
"apps_hint": "Empty = all apps; when set, the API key can only operate on the selected apps (recommended for per-app CI)",
"all_apps": "All apps",
"n_apps": "{{count}} app(s)"
},
Expand All @@ -297,7 +297,7 @@
"endpoint_label": "MCP endpoint",
"privacy_notice": "Results go to the client you authorize, which may forward them to the model provider you chose. Grant only the apps you need to debug.",
"token_name": "Token name",
"token_name_required": "Please enter a token name",
"token_name_required": "Please enter a name",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Keep MCP credential terminology as “token”.

These keys are under mcp, not api_tokens. mcp.token_name at Line 299 still says Token name, and src/i18n/locales/zh-CN.json keeps the MCP messages as token labels. The current English UI can report an MCP token as an API key being revoked.

Restore the MCP wording, or apply the same terminology change consistently to all MCP strings and both locales.

Proposed fix
-    "token_name_required": "Please enter a name",
+    "token_name_required": "Please enter a token name",
...
-    "revoke_success": "API Key revoked",
+    "revoke_success": "Token revoked",

Also applies to: 340-340

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/i18n/locales/en.json` at line 300, Restore consistent “token” terminology
for the MCP localization strings: update the affected English MCP entries,
including token_name_required and the additional key at the corresponding MCP
message, and ensure mcp.token_name remains “Token name.” Keep the API-token
wording isolated to api_tokens and align the equivalent MCP messages in both
en.json and zh-CN.json.

"token_name_placeholder": "e.g. troubleshooting",
"client_id": "Client label",
"client_id_required": "Please enter a client label",
Expand Down Expand Up @@ -337,7 +337,7 @@
"revoke_button": "Revoke",
"revoke_title": "Revoke this token?",
"revoke_desc": "Clients using it disconnect immediately.",
"revoke_success": "Token revoked",
"revoke_success": "API Key revoked",
"revoke_failed": "Revocation failed",
"yes": "Yes",
"no": "No"
Expand Down Expand Up @@ -700,7 +700,8 @@
"service_status": "Service Status",
"audit_logs": "Audit Logs",
"realtime_metrics": "Real-time Metrics",
"api_tokens": "API Tokens",
"automation": "Automation",
"api_tokens": "API Keys",
"admin": "Admin",
"dynamic_config": "Dynamic Config",
"user_management": "User Management",
Expand Down
35 changes: 18 additions & 17 deletions src/i18n/locales/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -220,13 +220,13 @@
"key_pending": "尚未生成 App Key"
},
"api_tokens": {
"create_success": "API Token 创建成功",
"create_success": "API Key 创建成功",
"create_failed": "创建失败",
"revoke_success": "Token 已撤销",
"revoke_success": "API Key 已撤销",
"revoke_failed": "撤销失败",
"col_id": "ID",
"col_name": "名称",
"col_token": "Token",
"col_token": "API Key",
"col_permissions": "权限",
"col_expires": "过期时间",
"col_last_used": "最后使用",
Expand All @@ -240,18 +240,18 @@
"never": "永不过期",
"never_used": "从未使用",
"revoke_title": "确认撤销",
"revoke_desc": "撤销后此 Token 将无法再使用,确定要撤销吗?",
"revoke_desc": "撤销后此 API Key 将无法再使用,确定要撤销吗?",
"yes": "确定",
"no": "取消",
"revoke_button": "撤销",
"title": "API Token 管理",
"description_prefix": "API Token 可用于 CI/CD 流程或自动化脚本中调用",
"title": "API Key 管理",
"description_prefix": "API Key 可用于 CI/CD 流程或自动化脚本中调用",
"pushy_api": "Pushy API",
"description_suffix": "。每个用户最多可同时保留 10 个活跃的 Token。",
"create_token": "创建 Token",
"create_modal_title": "创建 API Token",
"token_name": "Token 名称",
"token_name_required": "请输入 Token 名称",
"description_suffix": "。每个用户最多可同时保留 10 个活跃的 API Key。",
"create_token": "创建 API Key",
"create_modal_title": "创建 API Key",
"token_name": "名称",
"token_name_required": "请输入名称",
"token_name_placeholder": "例如:CI/CD Pipeline",
"permissions": "权限",
"permissions_required": "请至少选择一个权限",
Expand All @@ -266,16 +266,16 @@
"exp_180": "180 天",
"exp_360": "360 天",
"create_button": "创建",
"created_title": "Token 创建成功",
"created_title": "API Key 创建成功",
"created_ok": "我已保存",
"created_warning": "⚠️ 请立即复制并安全保存此 Token,关闭后将无法再次查看!",
"created_warning": "⚠️ 请立即复制并安全保存此 API Key,关闭后将无法再次查看!",
"copied": "已复制到剪贴板",
"copy_button": "复制 Token",
"copy_button": "复制 API Key",
"mode": "权限模式",
"mode_classic": "经典(按方法)",
"mode_scoped": "细粒度(按操作)",
"scopes": "细粒度权限",
"scopes_hint": "团队成员创建 token 时必须使用细粒度权限,且不能超出自身角色",
"scopes_hint": "团队成员创建 API Key 时必须使用细粒度权限,且不能超出自身角色",
"scopes_required": "请至少选择一个权限",
"scope_app_read": "读取应用/版本/统计",
"scope_app_write": "创建/修改应用设置",
Expand All @@ -284,7 +284,7 @@
"scope_version_publish": "发布/回滚/绑定",
"scope_version_delete": "删除版本/原生包",
"col_apps": "应用范围",
"apps_hint": "留空 = 全部应用;选择后此 token 仅能操作所选应用(CI 单应用流水线推荐)",
"apps_hint": "留空 = 全部应用;选择后此 API Key 仅能操作所选应用(CI 单应用流水线推荐)",
"all_apps": "全部应用",
"n_apps": "{{count}} 个应用"
},
Expand Down Expand Up @@ -700,7 +700,8 @@
"service_status": "服务状态",
"audit_logs": "操作日志",
"realtime_metrics": "实时数据",
"api_tokens": "API Token",
"automation": "自动化",
"api_tokens": "API Key",
"admin": "管理员",
"dynamic_config": "动态配置",
"user_management": "用户管理",
Expand Down