Skip to content

feat: enhance localization for operation records#576

Open
BugsGuru wants to merge 1 commit intomainfrom
feat-operation-record-ce
Open

feat: enhance localization for operation records#576
BugsGuru wants to merge 1 commit intomainfrom
feat-operation-record-ce

Conversation

@BugsGuru
Copy link
Collaborator

@BugsGuru BugsGuru commented Mar 5, 2026

关联的 issue

https://github.com/actiontech/sqle-ee/issues/2635

描述你的变更

补充dms中:角色、成员组、系统公告相关操作记录

确认项(pr提交后操作)

Tip

请在指定复审人之前,确认并完成以下事项,完成后✅


  • 我已完成自测
  • 我已记录完整日志方便进行诊断
  • 我已在关联的issue里补充了实现方案
  • 我已在关联的issue里补充了测试影响面
  • 我已确认了变更的兼容性,如果不兼容则在issue里标记 not_compatible
  • 我已确认了是否要更新文档,如果要更新则在issue里标记 need_update_doc

@LordofAvernus LordofAvernus requested review from winfredLIN and removed request for winfredLIN March 5, 2026 07:04
@github-actions
Copy link

github-actions bot commented Mar 5, 2026

PR Reviewer Guide 🔍

(Review updated until commit 3fdb7ff)

⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

命名一致性

请检查新添加的国际化消息键在中文文件中是否与现有键和格式保持一致,并确认参数占位符等格式无误。

OpRecordUserCreate                = &i18n.Message{ID: "OpRecordUserCreate", Other: "创建用户"}
OpRecordUserCreateWithName        = &i18n.Message{ID: "OpRecordUserCreateWithName", Other: "创建用户 %s"}
OpRecordCurrentUserUpdate         = &i18n.Message{ID: "OpRecordCurrentUserUpdate", Other: "更新个人中心账号基本信息"}
OpRecordUserUpdate                = &i18n.Message{ID: "OpRecordUserUpdate", Other: "更新用户 %s"}
OpRecordUserDelete                = &i18n.Message{ID: "OpRecordUserDelete", Other: "删除用户 %s"}
OpRecordMemberCreate              = &i18n.Message{ID: "OpRecordMemberCreate", Other: "添加成员"}
OpRecordMemberCreateWithName      = &i18n.Message{ID: "OpRecordMemberCreateWithName", Other: "添加成员 %s"}
OpRecordMemberUpdate              = &i18n.Message{ID: "OpRecordMemberUpdate", Other: "更新成员 %s"}
OpRecordMemberDelete              = &i18n.Message{ID: "OpRecordMemberDelete", Other: "删除成员 %s"}
OpRecordMemberGroupCreate         = &i18n.Message{ID: "OpRecordMemberGroupCreate", Other: "添加成员组"}
OpRecordMemberGroupCreateWithName = &i18n.Message{ID: "OpRecordMemberGroupCreateWithName", Other: "添加成员组 %s"}
OpRecordMemberGroupUpdate         = &i18n.Message{ID: "OpRecordMemberGroupUpdate", Other: "更新成员组 %s"}
OpRecordMemberGroupDelete         = &i18n.Message{ID: "OpRecordMemberGroupDelete", Other: "删除成员组 %s"}
OpRecordRoleCreate                = &i18n.Message{ID: "OpRecordRoleCreate", Other: "创建角色"}
OpRecordRoleCreateWithName        = &i18n.Message{ID: "OpRecordRoleCreateWithName", Other: "创建角色 %s"}
OpRecordRoleUpdate                = &i18n.Message{ID: "OpRecordRoleUpdate", Other: "更新角色 %s"}
OpRecordRoleDelete                = &i18n.Message{ID: "OpRecordRoleDelete", Other: "删除角色 %s"}
OpRecordProjectCreate             = &i18n.Message{ID: "OpRecordProjectCreate", Other: "创建项目"}
翻译对应性

请验证新增的英文消息字符串与其他语言版本对应的翻译保持一致,确保语义准确并符合统一风格。

OAuth2SyncSessionErr = "Failed to synchronize OAuth2 session: %v"
OAuth2UserNotBoundAndDisableManuallyBindErr = "No user associated with %q was found and manual binding is disabled; please contact the system administrator"
OAuth2UserNotBoundAndNoPermErr = "This OAuth2 user is not bound and has no login permissions"
OAuth2UserStatIsDisableErr = "User %q is disabled"
OpRecordConfigCompanyNotice = "Update company notice"
OpRecordConfigFeishu = "Update Feishu configuration"
OpRecordConfigLDAP = "Update LDAP configuration"
OpRecordConfigLogin = "Update login configuration"
OpRecordConfigOAuth2 = "Update OAuth2 configuration"
OpRecordConfigSMTP = "Update SMTP configuration"
OpRecordConfigSms = "Update SMS configuration"
OpRecordConfigSystemVariables = "Update system variables configuration"
OpRecordConfigWebhook = "Update Webhook configuration"
OpRecordConfigWechat = "Update WeChat Work configuration"
OpRecordCurrentUserUpdate = "Update account basic info"
OpRecordDBServiceCreate = "Create data source"
OpRecordDBServiceCreateWithName = "Create data source %s"
OpRecordDBServiceDelete = "Delete data source %s"
OpRecordDBServiceImport = "Import data sources"
OpRecordDBServiceUpdate = "Update data source %s"
OpRecordDataExportApproveWithName = "Approve data export workflow %s"
OpRecordDataExportCancel = "Cancel data export workflow"
OpRecordDataExportCancelWithName = "Cancel data export workflow %s"
OpRecordDataExportCreate = "Create data export workflow"
OpRecordDataExportCreateWithName = "Create data export workflow %s"
OpRecordDataExportExportWithName = "Execute data export %s"
OpRecordDataExportRejectWithName = "Reject data export workflow %s"
OpRecordMemberCreate = "Add member"
OpRecordMemberCreateWithName = "Add member %s"
OpRecordMemberDelete = "Delete member %s"
OpRecordMemberGroupCreate = "Add member group"
OpRecordMemberGroupCreateWithName = "Add member group %s"
OpRecordMemberGroupDelete = "Delete member group %s"
OpRecordMemberGroupUpdate = "Update member group %s"
OpRecordMemberUpdate = "Update member %s"
OpRecordProjectArchive = "Archive project %s"
OpRecordProjectCreate = "Create project"
OpRecordProjectCreateWithName = "Create project %s"
OpRecordProjectDelete = "Delete project %s"
OpRecordProjectUnarchive = "Unarchive project %s"
OpRecordProjectUpdate = "Update project %s"
OpRecordRoleCreate = "Create role"
OpRecordRoleCreateWithName = "Create role %s"
OpRecordRoleDelete = "Delete role %s"
OpRecordRoleUpdate = "Update role %s"
翻译对应性

请确保新增的中文消息文本与英文版本及其他语言的版本在内容和格式上保持一致,避免因格式不统一产生歧义。

OAuth2SyncSessionErr = "同步OAuth2会话失败: %v"
OAuth2UserNotBoundAndDisableManuallyBindErr = "未查询到 %q 关联的用户且关闭了手动绑定功能,请联系系统管理员"
OAuth2UserNotBoundAndNoPermErr = "该OAuth2用户未绑定且没有登陆权限"
OAuth2UserStatIsDisableErr = "用户 %q 被禁用"
OpRecordConfigCompanyNotice = "更新系统公告"
OpRecordConfigFeishu = "更新飞书配置"
OpRecordConfigLDAP = "更新LDAP配置"
OpRecordConfigLogin = "更新登录配置"
OpRecordConfigOAuth2 = "更新OAuth2配置"
OpRecordConfigSMTP = "更新SMTP配置"
OpRecordConfigSms = "更新短信配置"
OpRecordConfigSystemVariables = "更新系统变量配置"
OpRecordConfigWebhook = "更新Webhook配置"
OpRecordConfigWechat = "更新企业微信配置"
OpRecordCurrentUserUpdate = "更新个人中心账号基本信息"
OpRecordDBServiceCreate = "创建数据源"
OpRecordDBServiceCreateWithName = "创建数据源 %s"
OpRecordDBServiceDelete = "删除数据源 %s"
OpRecordDBServiceImport = "导入数据源"
OpRecordDBServiceUpdate = "更新数据源 %s"
OpRecordDataExportApproveWithName = "审批通过数据导出工单 %s"
OpRecordDataExportCancel = "取消数据导出工单"
OpRecordDataExportCancelWithName = "取消数据导出工单 %s"
OpRecordDataExportCreate = "创建数据导出工单"
OpRecordDataExportCreateWithName = "创建数据导出工单 %s"
OpRecordDataExportExportWithName = "执行数据导出 %s"
OpRecordDataExportRejectWithName = "驳回数据导出工单 %s"
OpRecordMemberCreate = "添加成员"
OpRecordMemberCreateWithName = "添加成员 %s"
OpRecordMemberDelete = "删除成员 %s"
OpRecordMemberGroupCreate = "添加成员组"
OpRecordMemberGroupCreateWithName = "添加成员组 %s"
OpRecordMemberGroupDelete = "删除成员组 %s"
OpRecordMemberGroupUpdate = "更新成员组 %s"
OpRecordMemberUpdate = "更新成员 %s"
OpRecordProjectArchive = "归档项目 %s"
OpRecordProjectCreate = "创建项目"
OpRecordProjectCreateWithName = "创建项目 %s"
OpRecordProjectDelete = "删除项目 %s"
OpRecordProjectUnarchive = "取消归档项目 %s"
OpRecordProjectUpdate = "更新项目 %s"
OpRecordRoleCreate = "创建角色"
OpRecordRoleCreateWithName = "创建角色 %s"
OpRecordRoleDelete = "删除角色 %s"
OpRecordRoleUpdate = "更新角色 %s"

@github-actions
Copy link

github-actions bot commented Mar 5, 2026

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
Possible issue
修正英文文本

建议将 OpRecordDataExportCancel
在英文语言文件中的文本由中文修改为英文,以保持语言文件的一致性和正确性。这对于用户界面的多语言支持至关重要,避免因语言错误引发混乱。

internal/pkg/locale/active.en.toml [175]

-OpRecordDataExportCancel = "取消数据导出工单"
+OpRecordDataExportCancel = "Cancel data export workflow"
Suggestion importance[1-10]: 8

__

Why: This suggestion corrects a language inconsistency by translating the Chinese text to English, thereby improving user interface consistency.

Medium

- Added new messages for company notice updates, user account info updates, member group management, and role management in both English and Chinese locale files.
- Improved internationalization support for operation recording features.
@BugsGuru BugsGuru force-pushed the feat-operation-record-ce branch from dc710b3 to 3fdb7ff Compare March 5, 2026 07:06
@github-actions
Copy link

github-actions bot commented Mar 5, 2026

Persistent review updated to latest commit 3fdb7ff

@github-actions
Copy link

github-actions bot commented Mar 5, 2026

PR Code Suggestions ✨

No code suggestions found for the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant