"""Human labels for cards built from a tool schema. A derived action gets its rows from the tool's JSON schema, where the property titles are whatever FastMCP generated from the Python signature — "Target Kind", "Alias Local Part". That is fine for a machine and wrong for the one surface whose entire job is that the employee understood what they are approving. The lexicons here close that gap without needing a hand-written card per flow: * **fields** — parameter names repeat across the whole registry (``reason``, ``target_email``, ``justification``), so one entry serves every action that takes it. This is why a lexicon beats per-action authoring. * **values** — a handful of enum values an employee would misread as jargon. * **titles** — the employee-facing flows, by tool name. Anything missing falls back to a humanised tool name rather than to English prose, so an unlisted flow looks plain instead of looking broken. Nothing here changes what runs; it changes only what the card says. """ from __future__ import annotations from app.core.locale import DEFAULT_LANG, Lang Tri = dict[Lang, str] def _t(zh: str, en: str, ja: str) -> Tri: return {"zh": zh, "en": en, "ja": ja} #: Parameter name → label. Keyed on the name alone because the platform names #: the same concept the same way across domains. FIELDS: dict[str, Tri] = { # ── 安全宣贯(迁移 597)。``acknowledge_security_awareness`` 的唯一参数。 "campaign_id": _t("宣贯活动", "Awareness campaign", "啓発キャンペーン"), # ── 数据集授权生命周期(访问对象闭环 PR2,迁移 606) # 持有人自己看到的是「哪一份数据集授权」,不是一个 UUID 的名字。 "binding_id": _t("数据集授权", "Dataset grant", "データセット権限"), # ── GitHub ID 自助修改(迁移 579) "github_id": _t("GitHub 用户名", "GitHub username", "GitHub ユーザー名"), # ── vulnerability reports (the business owner's card) "decision": _t("你的判断", "Your verdict", "あなたの判断"), "remediation_status": _t("修复状态", "Fix status", "修正ステータス"), "fix_eta": _t("预计修复时间", "Expected fix date", "修正予定日"), # Advisory only — the tier (and the reward it carries) stays the # security team's call, so the label must not read like a decision. "suggested_severity": _t( "建议级别(仅供参考)", "Suggested severity (advisory)", "推奨レベル(参考)", ), "finding_id": _t("治理发现", "Finding", "検出事項"), # ── approval-flow ownership. ``to_person_id`` is required on a # transfer: 「不是我」 without naming who leaves the register no # better off, and the label has to make that ask legible. "flow_id": _t("审批流程", "Approval flow", "承認フロー"), "to_person_id": _t("交给谁", "Hand over to", "引き継ぎ先"), "proposed_name": _t("希望的流程名称", "Proposed flow name", "希望する名称"), "proposed_category": _t("分类", "Category", "分類"), "proposed_owner_person_id": _t( "以后谁负责", "Who should own it", "今後の担当者", ), "subscription": _t("订阅设置", "Subscription", "配信設定"), # identity / targets "target_email": _t("目标邮箱", "Target mailbox", "対象メールアドレス"), "target_kind": _t("目标类型", "Target type", "対象の種類"), "person_id": _t("相关人员", "Person", "対象者"), "owner_email": _t("负责人邮箱", "Owner", "担当者"), "member_emails": _t("成员", "Members", "メンバー"), "manager_email": _t("直属上级", "Manager", "上長"), # email "alias_local_part": _t("别名前缀", "Alias name", "エイリアス名"), "alias_suffix": _t("别名后缀", "Alias domain", "エイリアスのドメイン"), "alias_email": _t("别名地址", "Alias address", "エイリアスアドレス"), "group_email": _t("邮件组地址", "Group address", "グループアドレス"), "group_name": _t("邮件组名称", "Group name", "グループ名"), # why / description "reason": _t("申请原因", "Reason", "申請理由"), "justification": _t("申请理由", "Justification", "申請理由"), "purpose": _t("用途", "Purpose", "用途"), "description": _t("说明", "Description", "説明"), "usage_description": _t("使用场景", "How it will be used", "利用シーン"), "body": _t("问题描述", "Details", "詳細"), "title": _t("标题", "Title", "タイトル"), "comment": _t("备注", "Comment", "コメント"), "note": _t("备注", "Note", "備考"), "remark": _t("备注", "Remark", "備考"), # classification "category": _t("分类", "Category", "カテゴリ"), "priority": _t("优先级", "Priority", "優先度"), "severity": _t("严重程度", "Severity", "深刻度"), "request_type": _t("申请类型", "Request type", "申請種別"), "environment": _t("环境", "Environment", "環境"), "scope": _t("范围", "Scope", "範囲"), "role": _t("角色", "Role", "ロール"), "level": _t("级别", "Level", "レベル"), # software / assets / cloud "software_name": _t("软件", "Software", "ソフトウェア"), # ── ids, labelled by what they identify (the card shows the NAME) ── "plan_id": _t("软件套餐", "Plan", "プラン"), "permission_id": _t("权限", "Permission", "権限"), "provider_id": _t("供应商", "Provider", "プロバイダー"), "ticket_id": _t("工单", "Ticket", "チケット"), "request_id": _t("申请单", "Request", "申請"), "group_id": _t("邮件组", "Mail group", "メールグループ"), "asset_id": _t("设备", "Device", "機器"), "scope_id": _t("云订阅", "Cloud scope", "クラウド範囲"), "charge_id": _t("费用项", "Charge", "課金項目"), "item_id": _t("条目", "Item", "項目"), "process_id": _t("流程", "Process", "プロセス"), "assignment_id": _t("分配", "Assignment", "割り当て"), "user_permission_id": _t("权限申请", "Access request", "権限申請"), "seat_count": _t("坐席数", "Seats", "席数"), "addon_name": _t("增值项", "Add-on", "アドオン"), "asset_category": _t("设备类型", "Device type", "機器の種類"), "asset_tag": _t("资产编号", "Asset tag", "資産番号"), "account_id": _t("云账号", "Cloud account", "クラウドアカウント"), "provider": _t("云厂商", "Provider", "プロバイダー"), "region": _t("区域", "Region", "リージョン"), "vpn_node": _t("VPN 节点", "VPN node", "VPN ノード"), "resource_checklist": _t("需要访问的资源", "Resources needed", "必要なリソース"), # network / dns "domain": _t("域名", "Domain", "ドメイン"), "record_type": _t("记录类型", "Record type", "レコード種別"), "record_value": _t("记录值", "Record value", "レコード値"), "ttl": _t("TTL", "TTL", "TTL"), # time "start_date": _t("开始日期", "Start date", "開始日"), "end_date": _t("结束日期", "End date", "終了日"), "expires_at": _t("到期时间", "Expires", "有効期限"), "duration_days": _t("有效天数", "Duration (days)", "期間(日)"), # misc "url": _t("链接", "Link", "リンク"), "tool_name": _t("工具名称", "Tool", "ツール"), "vendor": _t("供应商", "Vendor", "ベンダー"), "amount": _t("金额", "Amount", "金額"), "currency": _t("币种", "Currency", "通貨"), # ── Added 2026-08-18 ────────────────────────────────────────────── # 118 parameter rows across 60 cards had no Chinese label, so a zh card # read 「Bank Account」/「Monthly Budget Usd」 on the platform's primary # employee-facing write surface. "name": _t("名称", "Name", "名称"), "id": _t("编号", "Id", "ID"), "ids": _t("编号列表", "Ids", "ID 一覧"), "action": _t("处理方式", "Action", "対応"), "notes": _t("备注", "Notes", "備考"), "days": _t("天数", "Days", "日数"), "quantity": _t("数量", "Quantity", "数量"), "report_id": _t("月报", "Report", "月報"), "confirmation_id": _t("确认单", "Confirmation", "確認書"), "celebration_id": _t("庆祝", "Celebration", "お祝い"), "post_id": _t("动态", "Post", "投稿"), "catalog_id": _t("软件条目", "Catalog entry", "ソフト項目"), "allocation_id": _t("分配记录", "Allocation", "割当"), "integration_id": _t("集成", "Integration", "連携"), "monthly_budget_usd": _t("月度预算(美元)", "Monthly budget (USD)", "月次予算(USD)"), "ttl_days": _t("有效天数", "Valid for (days)", "有効日数"), "grace_days": _t("宽限天数", "Grace period (days)", "猶予日数"), "expected_return_date": _t("预计归还日期", "Expected return date", "返却予定日"), "valid_from": _t("生效日期", "Valid from", "開始日"), "valid_until": _t("到期日期", "Valid until", "終了日"), "new_valid_until": _t("新的到期日期", "New expiry date", "新しい終了日"), "expiry_date": _t("到期日期", "Expiry date", "有効期限"), "reason_code": _t("原因", "Reason", "理由"), "reason_note": _t("原因说明", "Reason detail", "理由の詳細"), "selected_key": _t("所选项", "Selection", "選択項目"), "template_key": _t("模板", "Template", "テンプレート"), "answers": _t("答案", "Answers", "回答"), "uploads": _t("附件", "Attachments", "添付ファイル"), "project_name": _t("项目名称", "Project name", "プロジェクト名"), "expected_usage": _t("预计用途", "Expected usage", "想定用途"), "local_part": _t("邮箱前缀", "Mailbox prefix", "メールの前半"), "suffix": _t("邮箱域名", "Mail domain", "メールドメイン"), "resource_type": _t("资源类型", "Resource type", "リソース種別"), "resource_id": _t("资源", "Resource", "リソース"), "asset_type": _t("设备类型", "Device type", "機器種別"), "owner_person_id": _t("负责人", "Owner", "オーナー"), "it_contact_person_id": _t("IT 对接人", "IT contact", "IT 担当"), "additional_owner_ids": _t("其他管理员", "Additional owners", "追加オーナー"), "mentioned_person_ids": _t("提到的同事", "Mentioned colleagues", "メンションした同僚"), "login_url": _t("登录地址", "Login URL", "ログイン URL"), "mark_all": _t("全部标记", "Mark all", "すべて対象"), "muted_channels": _t("免打扰渠道", "Muted channels", "ミュートするチャネル"), "quiet_hours_enabled": _t("开启免打扰时段", "Quiet hours on", "サイレント時間帯"), "quiet_hours_start": _t("免打扰开始", "Quiet hours from", "開始時刻"), "quiet_hours_end": _t("免打扰结束", "Quiet hours to", "終了時刻"), "kind": _t("类型", "Kind", "種別"), "value": _t("取值", "Value", "値"), "message": _t("留言", "Message", "メッセージ"), "score": _t("评分", "Score", "評価"), "liked": _t("是否点赞", "Liked", "いいね"), "visibility": _t("可见范围", "Visibility", "公開範囲"), "slug": _t("标识", "Identifier", "識別子"), "attachments": _t("附件", "Attachments", "添付ファイル"), "attachment_url": _t("附件链接", "Attachment link", "添付リンク"), "evidence_photos": _t("照片凭证", "Photos", "写真"), "business_reason": _t("业务原因", "Business reason", "業務上の理由"), "response_type": _t("回应方式", "Response", "回答"), "response_notes": _t("回应说明", "Response notes", "回答の補足"), "new_location": _t("新位置", "New location", "新しい場所"), "birthday": _t("生日", "Birthday", "誕生日"), "birthday_visibility": _t("生日可见范围", "Birthday visibility", "誕生日の公開範囲"), "blessing_id": _t("祝福", "Blessing", "お祝い"), "sticker_key": _t("表情", "Sticker", "スタンプ"), "reply_to_comment_id": _t("回复的评论", "Replying to", "返信先"), "notify_comment_feishu": _t("评论时飞书通知我", "Notify me on comments", "コメント時に通知"), "notify_like_aggregate": _t("点赞汇总通知", "Aggregate like notices", "いいねをまとめて通知"), "domain_name": _t("域名", "Domain", "ドメイン"), "zone_name": _t("解析区域", "DNS zone", "DNS ゾーン"), "record_ids": _t("解析记录", "DNS records", "DNS レコード"), "target_record_id": _t("目标记录", "Target record", "対象レコード"), "server_ids": _t("服务器", "Servers", "サーバー"), "resource_ids": _t("资源", "Resources", "リソース"), "grant_ids": _t("授权", "Grants", "権限"), "principal_id": _t("云账号", "Cloud principal", "クラウドアカウント"), "cloud_account_type": _t("云账号类型", "Cloud account type", "アカウント種別"), "scopes": _t("授权范围", "Scopes", "スコープ"), "role_key": _t("角色", "Role", "ロール"), "role_display_name": _t("角色名称", "Role name", "ロール名"), "extra_role_keys": _t("附加角色", "Additional roles", "追加ロール"), "granted_fields": _t("授予的字段", "Granted fields", "許可する項目"), "data_level": _t("数据密级", "Data sensitivity", "データ機密度"), "data_type": _t("数据类型", "Data type", "データ種別"), "pii_justification": _t("个人信息使用理由", "PII justification", "個人情報の利用理由"), "privacy_policy": _t("隐私政策", "Privacy policy", "プライバシーポリシー"), "ai_name": _t("AI 工具名称", "AI tool", "AI ツール名"), "how_to_use": _t("使用方式", "How it will be used", "利用方法"), "license_info": _t("授权信息", "Licence info", "ライセンス情報"), "system_name": _t("系统名称", "System", "システム名"), "system_owner_person_id": _t("系统负责人", "System owner", "システム責任者"), "sso_provider": _t("SSO 提供方", "SSO provider", "SSO プロバイダ"), "acs_url": _t("ACS 地址", "ACS URL", "ACS URL"), "entity_id": _t("Entity ID", "Entity ID", "Entity ID"), "saml_metadata_xml": _t("SAML 元数据", "SAML metadata", "SAML メタデータ"), "x509_cert": _t("X509 证书", "X509 certificate", "X509 証明書"), "token_validity_days": _t("令牌有效天数", "Token validity (days)", "トークン有効日数"), "rate_limit_per_minute": _t("每分钟限流", "Rate limit / minute", "毎分レート上限"), "allow_self_cancel": _t("允许本人取消", "Allow self-cancel", "本人によるキャンセル可"), "offboarding_policy": _t("离职处理方式", "Offboarding policy", "退職時の扱い"), "on_behalf_of_owner_person_id": _t("代表的负责人", "On behalf of", "代理対象"), "request_group_id": _t("申请批次", "Request batch", "申請バッチ"), "allocation": _t("设备分配方案", "Hardware allocation", "機器の割当"), "service_account_email": _t("服务账号邮箱", "Service account", "サービスアカウント"), "dataset_resource_id": _t("数据集", "Dataset", "データセット"), "table_id": _t("数据表", "Table", "テーブル"), "table_selections": _t("转交的数据表", "Tables to reassign", "移管するテーブル"), } #: Enum values an employee would otherwise read as a code. VALUES: dict[str, Tri] = { "user": _t("用户邮箱", "User mailbox", "ユーザーのメール"), "group": _t("邮件组", "Mail group", "メールグループ"), "normal": _t("普通", "Normal", "通常"), "high": _t("高", "High", "高"), "urgent": _t("紧急", "Urgent", "緊急"), "low": _t("低", "Low", "低"), "self_borrow": _t("借用设备", "Borrow a device", "機器の貸出"), "repair": _t("设备报修", "Device repair", "機器の修理"), "account_access": _t("账号与权限", "Accounts & access", "アカウントと権限"), } #: Card heading per employee-facing flow. Short noun phrases: the heading is #: what the employee reads first to decide whether this is what they asked for. TITLES: dict[str, Tri] = { # ── 安全宣贯。「我已阅读并理解」在助手里的那一次确认 —— 它写进合规台账, # 所以卡片标题必须是人话而不是工具名;而且 ``search()`` 是拿工具名 + 这里 # 的本地化标题去排序的,少了这一条,中文问「安全宣贯确认」根本找不到它。 "acknowledge_security_awareness": _t( "确认已读安全宣贯材料", "Confirm you have read the security material", "セキュリティ啓発資料の既読を確認", ), # ── security vulnerability reports, as the assigned business owner sees # them. These three are the employee's whole side of the bounty loop: # give a verdict, move the fix, ask the security team something. They # shipped with the MCP tools and without curated headings, so a # Chinese-speaking owner was handed a card titled # "confirm_bounty_report". "confirm_bounty_report": _t( "确认漏洞报告", "Confirm a vulnerability report", "脆弱性報告の確認", ), "update_bounty_remediation": _t( "更新修复进展", "Update the fix progress", "修正状況の更新", ), "comment_on_bounty_report": _t( "给安全团队留言", "Message the security team", "セキュリティチームへ連絡", ), # ── GitHub ID 自助修改(迁移 579)。三条都是员工/HR Ops 真的会在助手 # 里说出口的事,派生标题会把它们渲染成 "cancel_my_github_id_change"。 "change_my_github_id": _t( "修改我的 GitHub ID", "Change my GitHub ID", "GitHub ID の変更", ), "cancel_my_github_id_change": _t( "撤回 GitHub ID 修改申请", "Withdraw the GitHub ID change", "GitHub ID 変更申請の取り下げ", ), "decide_github_id_change": _t( "确认 GitHub ID 修改", "Confirm a GitHub ID change", "GitHub ID 変更の承認", ), "cloud_resource_directory_act_on_finding": _t( "处理云资源治理发现", "Act on a governance finding", "ガバナンス検出事項への対応", ), "cloud_resource_report_subscription_update": _t( "调整云资源报表订阅", "Change the report subscription", "レポート配信設定の変更", ), "transfer_my_data_access_dataset_owner": _t( "转交数据集负责人", "Hand over a dataset owner", "データセット担当者の引き継ぎ", ), # ── the half-yearly approval-flow ownership check. These are the two # answers the card asks for, so a Chinese-speaking owner meeting them # through the assistant must not be handed "confirm_my_approval_flow". "confirm_my_approval_flow": _t( "确认审批流程仍由我负责", "Confirm an approval flow is still mine", "承認フローの担当継続を確認", ), "transfer_my_approval_flow": _t( "转交审批流程负责人", "Hand over an approval flow", "承認フロー担当者の引き継ぎ", ), "request_new_approval_flow": _t( "申请新建审批流程", "Ask for a new approval flow", "新しい承認フローを申請", ), # 「改说明」 rather than 「补写说明」: the tool also CLEARS (an empty # ``description`` wipes the published sentence), and a heading that is # untrue for one of the two things confirm can do is the defect this # lexicon exists to prevent. Wording tracks the web surface's own # ``approvalRegistry.purpose.*`` keys — 用途说明 / What it is for / 用途 — # so the same owner meeting this flow in chat and on the page reads the # same words. Shipped one day late: #3283 added the MCP tool, which made # it proposable the same commit, and the card said # "describe_my_approval_flow". "describe_my_approval_flow": _t( "修改审批流程用途说明", "Edit what an approval flow is for", "承認フローの用途を編集", ), "create_email_alias": _t("新增邮件别名", "Add an email alias", "メールエイリアスの追加"), "request_email_group": _t("申请邮件组", "Request a mail group", "メールグループの申請"), "request_join_email_group": _t("申请加入邮件组", "Join a mail group", "メールグループへの参加"), "leave_my_email_group": _t("退出邮件组", "Leave a mail group", "メールグループから退出"), "request_software_seat": _t("申请软件坐席", "Request a software seat", "ソフトウェア席の申請"), "request_software_addon": _t("申请软件增值项", "Request a software add-on", "アドオンの申請"), "request_permission": _t("申请权限", "Request access", "権限の申請"), "request_api_key": _t("申请 API Key", "Request an API key", "API キーの申請"), "submit_ai_tool_application": _t("申请 AI 工具", "Apply for an AI tool", "AI ツールの申請"), "submit_cloud_access_request": _t("申请云访问权限", "Request cloud access", "クラウド権限の申請"), "submit_cloud_scope_request": _t("申请云订阅", "Request a cloud scope", "クラウド範囲の申請"), "submit_dns_request": _t("申请 DNS 记录", "Request a DNS record", "DNS レコードの申請"), "submit_domain_registration": _t("申请注册域名", "Register a domain", "ドメイン登録の申請"), "submit_announcement_request": _t("申请发布公告", "Request an announcement", "お知らせ掲載の申請"), "request_identity_consumer": _t("申请身份消费方", "Request an identity consumer", "ID 連携先の申請"), "submit_sso_grant_request": _t("申请 SSO 授权", "Request SSO access", "SSO 権限の申請"), "request_cloud_grant_renewal": _t("申请云权限续期", "Renew cloud access", "クラウド権限の更新"), "cancel_support_ticket": _t("取消求助工单", "Cancel a support ticket", "依頼の取り消し"), "open_ticket_chat": _t( "为这张工单拉个群", "Open a group chat for this ticket", "チケットのグループを作成", ), "cancel_permission_request": _t("取消权限申请", "Cancel an access request", "権限申請の取り消し"), "cancel_api_key_rotation": _t("取消 API Key 轮换", "Cancel an API key rotation", "API キー更新の取り消し"), "cancel_my_cloud_grant_renewal": _t( "取消云权限续期", "Cancel my cloud renewal", "クラウド更新の取り消し", ), "cancel_my_software_addon_charge": _t( "取消软件增值项", "Cancel a software add-on", "アドオンの取り消し", ), "undo_my_seat_cancellation": _t( "撤销坐席退订", "Undo a seat cancellation", "席の解約を取り消す", ), "undo_attendance_confirmation": _t( "撤销考勤确认", "Undo an attendance confirmation", "勤怠確認の取り消し", ), "submit_approval_request": _t("提交审批申请", "Submit an approval request", "承認申請の送信"), "submit_data_access_service_account_grant": _t( "申请数据访问服务账号", "Request a data-access service account", "データアクセス用SAの申請", ), # #3080 shipped the flow without a heading, so the guard test went red on # main and an employee's card would have read 「以你的名义提交「Submit data # access personal grant」」 — the machine title this dictionary exists to # replace. 「本人」 because the tool derives the target account from the # authenticated identity and refuses a caller-supplied one. "submit_data_access_personal_grant": _t( "申请本人数据集读取权限", "Request dataset read access for yourself", "本人のデータセット閲覧権限を申請", ), "reassign_data_access_table_owner": _t( "转交数据表负责人", "Reassign table ownership", "テーブル所有者の移管", ), # Admin-tier flows. RBAC already limits who may run them; a heading here # only decides how the card reads for the people who can. # ── Added 2026-08-18 ────────────────────────────────────────────── # 34 of 60 cards fell back to ``humanise(tool_name)``, so a Chinese reader # was told 「确认后将以你的名义提交「Rotate api key」」. "acknowledge_expiry_renewal": _t("确认续期提醒", "Acknowledge renewal notice", "更新通知の確認"), "acknowledge_onboarding_item": _t("确认入职须知事项", "Confirm onboarding item", "入社チェック項目の確認"), "answer_security_quiz": _t("提交安全小测答案", "Submit security quiz answer", "セキュリティクイズの回答"), "complete_api_key_rotation": _t("完成 API Key 轮换", "Complete API key rotation", "API キー更新の完了"), "confirm_attendance_report": _t("确认考勤月报", "Confirm attendance report", "勤怠月報の確認"), "extend_api_key": _t("延长 API Key 有效期", "Extend API key validity", "API キーの有効期限延長"), "extend_asset_borrow": _t("延长设备借用", "Extend device loan", "機器貸出の延長"), "feed_ack_blessing": _t("答谢一条祝福", "Thank one blessing", "お祝いへのお礼"), "feed_add_comment": _t("发表评论", "Post a comment", "コメントを投稿"), "feed_create_post": _t("发布动态", "Publish a post", "投稿する"), "feed_react_post": _t("给动态点赞", "React to a post", "投稿にリアクション"), "feed_send_blessing": _t("送出祝福", "Send a blessing", "お祝いを送る"), "feed_thank_blessings": _t("一并答谢所有祝福", "Thank everyone at once", "まとめてお礼"), "feed_update_my_preferences": _t("更新动态偏好", "Update feed preferences", "フィード設定の更新"), # ── 访问对象闭环 PR1/PR2(2026-09-05)。四个持有人自己能做的动作。 # 标题是给**员工**看的一句话,不是工具名:卡片上出现 # ``renew_my_data_access_grant`` 这样的英文蛇形名,等于把内部命名 # 摊给一个只想知道「这是要我干什么」的人。 "keep_my_idle_api_key": _t( "保留我的闲置 API Key", "Keep my idle API key", "アイドル API キーを保持", ), "keep_my_idle_seat": _t("保留我的闲置坐席", "Keep my idle seat", "空き席を保持"), "mark_my_notifications_read": _t("标记通知已读", "Mark notifications read", "通知を既読にする"), "rate_support_ticket": _t("评价工单处理", "Rate this ticket", "チケットを評価"), "recertify_my_dns_records": _t("复核我的 DNS 记录", "Recertify my DNS records", "DNS レコードの再認証"), "release_my_data_access_grant": _t( "释放我的数据集授权", "Release my dataset grant", "データセット権限を解放", ), "renew_my_data_access_grant": _t( "续期我的数据集授权", "Renew my dataset grant", "データセット権限を更新", ), "respond_data_access_owner_confirmation": _t( "确认服务账号还需要这份授权", "Confirm a service account still needs this", "サービスアカウントの権限を確認", ), "release_my_api_key": _t("释放我的 API Key", "Release my API key", "API キーを解放"), "reply_to_support_ticket": _t("回复工单", "Reply to ticket", "チケットに返信"), "respond_cloud_scope_semiannual_confirm": _t("确认云订阅归属", "Confirm cloud scope ownership", "クラウド所有者の確認"), "respond_cloud_scope_zero_spend": _t("回应零消费提醒", "Respond to zero-spend alert", "ゼロ利用アラートへの回答"), "respond_inventory_item": _t("回应资产盘点", "Respond to inventory check", "棚卸への回答"), "respond_server_owner_confirmation": _t("确认服务器归属", "Confirm server ownership", "サーバー所有者の確認"), "return_attendance_report": _t("退回考勤月报", "Return attendance report", "勤怠月報の差し戻し"), "rotate_api_key": _t("轮换 API Key", "Rotate API key", "API キーの更新"), "set_my_notification_preferences": _t("设置通知偏好", "Set notification preferences", "通知設定"), "set_my_team_joiner_hardware_allocation": _t("为新同事分配设备", "Allocate hardware for a joiner", "新メンバーの機器割当"), "snooze_cloud_scope_idle_reminder": _t("暂缓闲置订阅提醒", "Snooze idle-scope reminder", "アイドル通知の一時停止"), "supplement_request_uploads": _t("补充申请附件", "Add files to a request", "申請に資料を追加"), "update_my_software_catalog_entry": _t("更新我的软件条目", "Update my software entry", "ソフト項目の更新"), "urge_request": _t("催办我的申请", "Nudge my request", "申請を催促"), } def _pick(table: Tri, lang: Lang) -> str: return table.get(lang) or table[DEFAULT_LANG] def humanise(name: str) -> str: """Fallback for anything the lexicons do not cover. ``alias_local_part`` → ``Alias local part``. Sentence case, not Title Case, to match the rest of the product's copy. """ words = str(name or "").replace("_", " ").strip() return words[:1].upper() + words[1:] if words else name def field_label(name: str, schema_title: str | None, lang: Lang) -> str: entry = FIELDS.get(name) if entry: return _pick(entry, lang) return humanise(schema_title or name) def value_label(value: str, lang: Lang) -> str: entry = VALUES.get(value) return _pick(entry, lang) if entry else value def title_label(tool_name: str, lang: Lang) -> str | None: entry = TITLES.get(tool_name) return _pick(entry, lang) if entry else None