Skip to content
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

feat(locales): add support for "zh_HK" and "zh_TW" context menu locales #2850

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

ghostendsky
Copy link
Contributor

Description

Currently, the default right-click context menu in the Chinese language interface loads the translation for 'zh-CN'. It would be great if it could support switching to 'zh-HK' or 'zh-TW' and load the corresponding translations as well.

PR Type

  • Feature
  • Bugfix
  • Hotfix
  • Other (please describe):

Screenshots (if UI change)

Demo Video (if new feature)

Linked Issues

Additional context

Changelog

  • I have updated the changelog/next.md with my changes.

@follow-reviewer-bot
Copy link

Thank you for your contribution. We will review it promptly.

Copy link

vercel bot commented Feb 22, 2025

@ghostendsky is attempting to deploy a commit to the RSS3 Team on Vercel.

A member of the Team first needs to authorize it.

@follow-reviewer-bot
Copy link

Suggested PR Title:

feat(i18n): add zh-HK and zh-TW localization support

Change Summary:
Updated resource types to include additional Chinese localizations: zh-HK and zh-TW, enhancing multilingual support.

Code Review:

Code Review

File: apps/main/src/@types/resources.ts

  1. Line 3:

    • The variable name zh_cn does not follow standard JavaScript/TypeScript naming conventions. Typically, variable names should use camelCase. Consider renaming it to zhCn to maintain consistency and readability.
  2. Lines 4-5:

    • Similar to the issue in Line 3, zh_hk and zh_tw should be renamed to zhHk and zhTw to adhere to camelCase naming conventions.
  3. Lines 9-15:

    • The keys "zh-CN", "zh-HK", and "zh-TW" are using inconsistent naming compared to the other keys like en and ja, which do not include hyphens or capitalization. Either normalize all locale keys (e.g., to match "en" style without hyphens and capitalization) for consistency across the resources object or leave a comment explaining the naming convention used and its necessity.

Summary:

  • Address the camelCase issue for variable names (zh_cn, zh_hk, zh_tw).
  • Assess the locale key naming convention for consistency or clarify it.

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