Skip to content

fix(i18n): update zh-CN translations & add package.trends.toggle_stack_mode key#1688

Merged
danielroe merged 2 commits intonpmx-dev:mainfrom
RYGRIT:i18n-zh_CN
Feb 27, 2026
Merged

fix(i18n): update zh-CN translations & add package.trends.toggle_stack_mode key#1688
danielroe merged 2 commits intonpmx-dev:mainfrom
RYGRIT:i18n-zh_CN

Conversation

@RYGRIT
Copy link
Contributor

@RYGRIT RYGRIT commented Feb 27, 2026

📚 Description

new i18n key

  • add package.trends.toggle_stack_mode ("Toggle stack mode") to en.json, schema.json, and wire it up in TrendsChart.vue

zh-CN translation fixes

  • filters.security_options.secure / insecure: values were swapped ("带有警告" ↔ "不带警告"), now corrected
  • filters.table.security_warning / no_packages: values were swapped, now corrected
  • org.teams.remove_user: "从团队 {user} 中移除" → "将 {user} 从团队中移除" (grammar fix)
  • package.trends.date_range / date_range_multiline: "到" → "至" (more formal)
  • a11y.contact.p1: improved wording for accessibility feedback section

@vercel
Copy link

vercel bot commented Feb 27, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
npmx.dev Ready Ready Preview, Comment Feb 27, 2026 9:05am
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Preview Feb 27, 2026 9:05am
npmx-lunaria Ignored Ignored Feb 27, 2026 9:05am

Request Review

@github-actions
Copy link

github-actions bot commented Feb 27, 2026

Lunaria Status Overview

🌕 This pull request will trigger status changes.

Learn more

By default, every PR changing files present in the Lunaria configuration's files property will be considered and trigger status changes accordingly.

You can change this by adding one of the keywords present in the ignoreKeywords property in your Lunaria configuration file in the PR's title (ignoring all files) or by including a tracker directive in the merged commit's description.

Tracked Files

File Note
lunaria/files/en-GB.json Localization changed, will be marked as complete.
lunaria/files/en-US.json Source changed, localizations will be marked as outdated.
lunaria/files/zh-CN.json Localization changed, will be marked as complete.
Warnings reference
Icon Description
🔄️ The source for this localization has been updated since the creation of this pull request, make sure all changes in the source have been applied.

@codecov
Copy link

codecov bot commented Feb 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 27, 2026

📝 Walkthrough

Walkthrough

This pull request introduces internationalization updates across multiple locale and schema files. The primary addition is a new translation key toggle\_stack\_mode for enabling stack mode functionality in the trends chart component. Beyond this, the Chinese (Simplified) locale receives substantial updates including new translation groups for size increase notifications, expanded compare section entries with file change details, and refinements to existing strings. Corresponding schema files are updated to reflect the new translation properties, and the changes are propagated across all supported locales including English variants.

Suggested reviewers

  • danielroe
🚥 Pre-merge checks | ✅ 1
✅ Passed checks (1 passed)
Check name Status Explanation
Description check ✅ Passed The pull request description clearly outlines all changes: adding a new i18n key for toggle_stack_mode and fixing multiple zh-CN translation issues with specific before/after examples.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1


ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9216dae and 977e967.

📒 Files selected for processing (7)
  • app/components/Package/TrendsChart.vue
  • i18n/locales/en.json
  • i18n/locales/zh-CN.json
  • i18n/schema.json
  • lunaria/files/en-GB.json
  • lunaria/files/en-US.json
  • lunaria/files/zh-CN.json

Comment on lines +160 to +166
"size_increase": {
"title_size": "自 v{version} 以来体积显著增加",
"title_deps": "自 v{version} 以来依赖项数量显著增加",
"title_both": "自 v{version} 以来体积和依赖项显著增加",
"size": "安装大小增加了 {percent} (增大了 {size})",
"deps": "{count} 个依赖项"
},
Copy link
Contributor

@coderabbitai coderabbitai bot Feb 27, 2026

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Preserve the “increase” meaning in size_increase.deps.

Line 165 currently reads as a plain dependency count, not an increase. Consider wording that keeps the delta semantics.

Suggested wording tweak
-      "deps": "{count} 个依赖项"
+      "deps": "依赖项增加了 {count} 个"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"size_increase": {
"title_size": "自 v{version} 以来体积显著增加",
"title_deps": "自 v{version} 以来依赖项数量显著增加",
"title_both": "自 v{version} 以来体积和依赖项显著增加",
"size": "安装大小增加了 {percent} (增大了 {size})",
"deps": "{count} 个依赖项"
},
"size_increase": {
"title_size": "自 v{version} 以来体积显著增加",
"title_deps": "自 v{version} 以来依赖项数量显著增加",
"title_both": "自 v{version} 以来体积和依赖项显著增加",
"size": "安装大小增加了 {percent} (增大了 {size})",
"deps": "依赖项增加了 {count} "
},

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The dynamic value count will have a "+" sign; I don't think it needs to have "增加" added.

Copy link
Contributor

Choose a reason for hiding this comment

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

@RYGRIT, thank you for the clarification! You're absolutely right—if the count value already includes the "+" sign (e.g., "+5"), then "{count} 个依赖项" naturally reads as "+5 个依赖项" and clearly conveys the increase without needing the additional "增加" word. That makes perfect sense and keeps the translation concise. The current wording is fine as is. 👍


🧠 Learnings used
Learnt from: serhalp
Repo: npmx-dev/npmx.dev PR: 1183
File: lunaria/files/uk-UA.json:305-318
Timestamp: 2026-02-08T18:44:10.538Z
Learning: In the npmx.dev project, new or changed entries in i18n translation files (locale JSON files) may be omitted from non-English languages. Translations are not completed in-band in the same PR and are tracked elsewhere. It is acceptable for non-English locale files to be missing keys that exist in English locale files.

Learnt from: userquin
Repo: npmx-dev/npmx.dev PR: 1096
File: i18n/locales/es-419.json:34-41
Timestamp: 2026-02-06T14:53:23.339Z
Learning: In the npmx.dev project, when using country locale variants (e.g., es-419, es-ES), place only translations that differ from the base language in variant JSON files (e.g., es-419.json). The base file (es.json) is loaded first, then the variant file overlays any keys it defines. This behavior is provided by vue-i18n's multiple-files feature. See CONTRIBUTING.md under 'Country variants (advanced)' for details.

@danielroe danielroe added this pull request to the merge queue Feb 27, 2026
Merged via the queue into npmx-dev:main with commit b6eb04f Feb 27, 2026
18 checks passed
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