Skip to content

Conversation

lwnmengjing
Copy link
Member

Description

Checklist

  • the pull request title describes what this PR does (not a vague title like Update index.md)
  • the pull request targets the default branch of the repository (main)
  • tests are added for the changes I made (if any source code was modified)
  • documentation added or updated
  • I have run the project locally and verified that there are no errors

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request adds internationalization support to various locales and components by introducing new i18n keys and replacing hard-coded text with formatted messages. It also removes debug logging and cleans up some UI text across pages such as Department, AccessToken, Generator, Post, and AppConfig.

  • Updated locale files (en-US.ts, zh-CN.ts, pages.ts) with new i18n keys.
  • Refactored React components (e.g., Department, AccessToken, Generator, Security, Binding, Post, Base) to use useIntl/fieldIntl for message translation.
  • Removed or commented out debug console logs for production readiness.

Reviewed Changes

Copilot reviewed 21 out of 21 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/locales/en-US.ts Added multiple new keys for form, appConfig, generator, and security messages
src/locales/en-US/pages.ts Introduced additional i18n keys for pages and updated role, post, and access token messages
src/locales/zh-CN.ts Added corresponding Chinese translations for new i18n keys
Various React component files (Department, AccessToken, Generator, etc.) Replaced hard-coded strings with internationalized messages and removed debug logs
src/components/MssBoot/theme.tsx, src/pages/AppConfig/components/base.tsx, and others Updated titles and tooltips to use i18n functions
Comments suppressed due to low confidence (2)

src/locales/en-US/pages.ts:314

  • [nitpick] Consider renaming 'website copy right' to 'website copyright' to align with standard terminology.
'pages.fields.websiteCopyRight': 'website copy right',

src/pages/Account/Settings/components/base.tsx:66

  • Consider adding explicit error messages for each validation rule to provide clearer feedback to users on invalid input.
rules: [{ required: true }, { min: 3 }, { max: 20 }, { pattern: /^[a-zA-Z0-9_]+$/ }],

@mss-boot mss-boot merged commit 8f9a141 into main Mar 21, 2025
1 check passed
@mss-boot mss-boot deleted the feat/i18n-m branch March 21, 2025 14:00
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.

2 participants