Skip to content

💥 feat(account-center): Add country information to the Account Center page #63

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 17, 2025

Conversation

lwnmengjing
Copy link
Member

Description

Add country information to the Account Center page

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 PR adds country information to the Account Center page by extending the translation files and updating the address rendering logic.

  • Adds new country translation keys in both en-US and zh-CN locale files
  • Updates the Account Center page to retrieve and display the country information alongside province, city, and address

Reviewed Changes

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

File Description
src/locales/en-US/pages.ts Added country translations for multiple countries
src/pages/Account/Center/index.tsx Updated address rendering to include country information
src/locales/zh-CN/pages.ts Added country translations for multiple countries
Comments suppressed due to low confidence (1)

src/pages/Account/Center/index.tsx:121

  • Ensure that userInfo?.country strictly matches the translation keys defined in the locale files. Consider adding a fallback value or default message to handle unexpected or undefined country values.
id: `pages.account.center.country.${userInfo?.country}`,

@mss-boot mss-boot merged commit 97593a9 into main Mar 17, 2025
1 check passed
@mss-boot mss-boot deleted the fix/center-i18n branch March 17, 2025 15:14
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