Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/components/Package/TrendsChart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1428,6 +1428,7 @@ const chartConfig = computed<VueUiXyConfig>(() => {
img: $t('package.trends.download_file', { fileType: 'PNG' }),
svg: $t('package.trends.download_file', { fileType: 'SVG' }),
annotator: $t('package.trends.toggle_annotator'),
stack: $t('package.trends.toggle_stack_mode'),
altCopy: $t('package.trends.copy_alt.button_label'), // Do not make this text dependant on the `copied` variable, since this would re-render the component, which is undesirable if the minimap was used to select a time frame.
},
callbacks: {
Expand Down
1 change: 1 addition & 0 deletions i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,7 @@
"date_range_multiline": "{start}\nto {end}",
"download_file": "Download {fileType}",
"toggle_annotator": "Toggle annotator",
"toggle_stack_mode": "Toggle stack mode",
"legend_estimation": "Estimation",
"no_data": "No data available",
"y_axis_label": "{granularity} {facet}",
Expand Down
96 changes: 85 additions & 11 deletions i18n/locales/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
"sections": {
"appearance": "外观",
"display": "显示",
"search": "搜索",
"search": "数据来源",
"language": "语言"
},
"data_source": {
Expand Down Expand Up @@ -157,6 +157,13 @@
"version": "此版本已废弃。",
"no_reason": "未提供原因"
},
"size_increase": {
"title_size": "自 v{version} 以来体积显著增加",
"title_deps": "自 v{version} 以来依赖项数量显著增加",
"title_both": "自 v{version} 以来体积和依赖项显著增加",
"size": "安装大小增加了 {percent} (增大了 {size})",
"deps": "{count} 个依赖项"
},
Comment on lines +160 to +166
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.

"replacement": {
"title": "你可能不需要这个依赖。",
"native": "该功能自 Node.js {nodeVersion} 起已被内置,可直接使用 {replacement} 替代。",
Expand Down Expand Up @@ -294,8 +301,16 @@
"view_all": "查看全部 {count} 个版本",
"distribution_title": "语义化版本分组",
"distribution_modal_title": "版本",
"distribution_range_date_same_year": "{endYear}年 {from} 至 {to}",
"distribution_range_date_multiple_years": "{startYear}年 {from} 至 {endYear}年 {to}",
"grouping_major": "主版本",
"grouping_minor": "次版本",
"grouping_versions_title": "版本",
"grouping_versions_all": "全部",
"grouping_versions_only_recent": "仅最近",
"grouping_usage_title": "使用率",
"grouping_usage_all": "全部",
"grouping_usage_low": "低",
"recent_versions_only_tooltip": "仅显示在过去一年内发布的版本。",
"show_low_usage_tooltip": "包括下载量低于 1% 的版本组。",
"y_axis_label": "下载量",
Expand All @@ -304,7 +319,11 @@
"filter_help": "语义化版本范围过滤帮助",
"filter_tooltip": "使用 {link} 过滤版本。例如,^3.0.0 显示所有 3.x 版本。",
"filter_tooltip_link": "语义化版本范围",
"no_matches": "没有匹配此范围的版本"
"no_matches": "没有匹配此范围的版本",
"copy_alt": {
"per_version_analysis": "{version} ({downloads}次)",
"general_description": "条形图展示了 {package_name} 在 {date_range_label} 期间的下载量分布,数据涵盖了{versions_count} 个 {semver_grouping_mode}(从{first_version}到{last_version})。下载量最高的版本是{max_downloaded_version},达{max_version_downloads}次。其余版本下载量:{per_version_analysis}。{watermark}。"
}
},
"dependencies": {
"title": "依赖({count} 个)",
Expand Down Expand Up @@ -350,10 +369,11 @@
"start_date": "开始",
"end_date": "结束",
"loading": "加载中…",
"date_range": "{start} {end}",
"date_range_multiline": "{start}\n到 {end}",
"date_range": "{start} {end}",
"date_range_multiline": "{start}\n至 {end}",
"download_file": "下载 {fileType}",
"toggle_annotator": "切换标注工具",
"toggle_stack_mode": "切换堆叠模式",
"legend_estimation": "估算值",
"no_data": "无可用数据",
"y_axis_label": "{granularity} {facet}",
Expand All @@ -364,6 +384,22 @@
"downloads": "下载量",
"likes": "喜欢",
"contributors": "贡献者"
},
"play_animation": "播放动画",
"pause_animation": "暂停动画",
"copy_alt": {
"trend_none": "平稳",
"trend_strong": "明显",
"trend_weak": "微弱",
"trend_undefined": "未知(数据不足)",
"button_label": "复制替代文本",
"watermark": "底部有水印 \"./npmx a fast, modern browser for the npm registry\"",
"analysis": "{package_name} 的下载量从{start_value},变为{end_value},变化趋势{trend}(平均每期变化{downloads_slope}次)",
"estimation": "(注:最终值为基于部分数据的估算)",
"estimations": "(注:最终值为基于部分数据的估算)",
"compare": "以下为 {packages} 的下载量对比折线图。",
"single_package": "{package} 的下载量折线图。",
"general_description": "Y 轴表示下载量,X 轴表示日期范围({start_date} 至 {end_date}),统计周期为{granularity}。{estimation_notice} {packages_analysis}。{watermark}。"
}
},
"downloads": {
Expand Down Expand Up @@ -524,7 +560,7 @@
"member_count": "{count} 个成员",
"members_of": "团队 {team} 的成员",
"no_members": "没有成员",
"remove_user": "从团队 {user} 中移除",
"remove_user": " {user} 从团队中移除",
"username_to_add": "要添加到 {team} 的用户名",
"username_placeholder": "用户名…",
"add_button": "添加",
Expand Down Expand Up @@ -621,6 +657,7 @@
"invalid_name": "无效的包名:",
"available": "这个名称可用!",
"taken": "这个名称已被占用。",
"missing_permission": "你没有权限将包添加到 {'@'}{scope} 下面。",
"similar_warning": "存在相似的包 — npm 可能会拒绝这个名称:",
"related": "相关包:",
"scope_warning_title": "考虑使用一个限定范围的包",
Expand Down Expand Up @@ -722,8 +759,8 @@
},
"security_options": {
"all": "所有包",
"secure": "带有警告",
"insecure": "不带警告"
"secure": "没有警告",
"insecure": "有警告"
},
"sort": {
"label": "排序包",
Expand Down Expand Up @@ -783,9 +820,9 @@
"showing_paginated": "已显示 {pageSize} 个,共 {count} 个包"
},
"table": {
"security_warning": "未找到包",
"security_warning": "安全性警告",
"secure": "安全",
"no_packages": "安全性警告"
"no_packages": "未找到包"
}
},
"about": {
Expand Down Expand Up @@ -815,6 +852,12 @@
"managers": "管理器"
}
},
"sponsors": {
"title": "赞助商"
},
"oss_partners": {
"title": "开源合作伙伴"
},
"team": {
"title": "团队",
"governance": "治理",
Expand Down Expand Up @@ -907,6 +950,7 @@
"section_packages": "包",
"section_facets": "维度",
"section_comparison": "比较",
"copy_as_markdown": "复制为 Markdown",
"loading": "正在加载包数据…",
"error": "加载包数据失败。请重试。",
"empty_title": "选择要比较的包",
Expand Down Expand Up @@ -1014,7 +1058,37 @@
"trends": {
"title": "比较趋势"
}
}
},
"file_changes": "文件更改",
"files_count": "{count} 个文件",
"lines_hidden": "已隐藏 {count} 行",
"compare_versions": "差异",
"summary": "摘要",
"deps_count": "{count} 个依赖",
"dependencies": "直接依赖项",
"dev_dependencies": "开发依赖项",
"peer_dependencies": "对等依赖项",
"optional_dependencies": "可选依赖项",
"no_dependency_changes": "无依赖项更改",
"file_filter_option": {
"all": "全部 ({count})",
"added": "新增 ({count})",
"removed": "删除 ({count})",
"modified": "修改 ({count})"
},
"search_files_placeholder": "搜索文件…",
"no_files_all": "暂无文件",
"no_files_search": "未找到与 \"{query}\" 匹配的文件",
"no_files_filtered": "没有 {filter} 的文件",
"filter": {
"added": "新增",
"removed": "删除",
"modified": "修改"
},
"files_button": "文件",
"select_file_prompt": "从侧边栏选择一个文件以查看其差异",
"close_files_panel": "关闭文件面板",
"filter_files_label": "按更改类型筛选文件"
},
"privacy_policy": {
"title": "隐私政策",
Expand Down Expand Up @@ -1122,7 +1196,7 @@
},
"contact": {
"title": "反馈",
"p1": "如果你在 {app} 上遇到无障碍问题,请通过在我们的 {link} 上提交问题来告诉我们。我们会认真对待这些报告,并尽力解决它们。",
"p1": "如果你在 {app} 上遇到无障碍访问问题,请在我们的 {link} 上提交 Issue 反馈给我们。我们会认真对待这些反馈,并尽力解决。",
"link": "GitHub 仓库"
}
}
Expand Down
3 changes: 3 additions & 0 deletions i18n/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1123,6 +1123,9 @@
"toggle_annotator": {
"type": "string"
},
"toggle_stack_mode": {
"type": "string"
},
"legend_estimation": {
"type": "string"
},
Expand Down
1 change: 1 addition & 0 deletions lunaria/files/en-GB.json
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,7 @@
"date_range_multiline": "{start}\nto {end}",
"download_file": "Download {fileType}",
"toggle_annotator": "Toggle annotator",
"toggle_stack_mode": "Toggle stack mode",
"legend_estimation": "Estimation",
"no_data": "No data available",
"y_axis_label": "{granularity} {facet}",
Expand Down
1 change: 1 addition & 0 deletions lunaria/files/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,7 @@
"date_range_multiline": "{start}\nto {end}",
"download_file": "Download {fileType}",
"toggle_annotator": "Toggle annotator",
"toggle_stack_mode": "Toggle stack mode",
"legend_estimation": "Estimation",
"no_data": "No data available",
"y_axis_label": "{granularity} {facet}",
Expand Down
Loading
Loading