mirror of
https://github.com/abhigyanpatwari/GitNexus.git
synced 2026-09-29 01:41:42 +00:00
fix(query): wire --include-tests into i18n parity tables
CI parity test cli-index-help.test.ts > 'localizes every registered
CLI command and option description in zh-CN help' enforces that every
CLI option's English help description has a matching entry in the i18n
localizer + both en.ts and zh-CN.ts resource files. The new query
--include-tests flag was missing all three.
Changes:
- src/cli/index.ts: trim the option description to match impact's exact
wording ('Include test files in results') so both options reuse the
same English literal, matching the existing convention.
- src/cli/help-i18n.ts: register 'query|--include-tests' -> 'help.option.query.includeTests'
alongside the existing 'impact|--include-tests' entry.
- src/cli/i18n/en.ts: add 'help.option.query.includeTests' with the
English string.
- src/cli/i18n/zh-CN.ts: add 'help.option.query.includeTests' with the
Chinese translation '在结果中包含测试文件' (same wording as the
existing 'help.option.impact.includeTests' entry; preserves parity
between the two options' help text in both languages).
Verified: cli-index-help.test.ts passes 12/12 locally. No other tests
changed.
This commit is contained in:
parent
a61dd2c3ab
commit
0e2648d1df
4 changed files with 4 additions and 1 deletions
|
|
@ -95,6 +95,7 @@ const OPTION_DESCRIPTION_KEYS = {
|
|||
'query|-g, --goal <text>': 'help.option.query.goal',
|
||||
'query|-l, --limit <n>': 'help.option.query.limit',
|
||||
'query|--content': 'help.option.content',
|
||||
'query|--include-tests': 'help.option.query.includeTests',
|
||||
'context|-r, --repo <name>': 'help.option.repo.target',
|
||||
'context|-u, --uid <uid>': 'help.option.context.uid',
|
||||
'context|-f, --file <path>': 'help.option.context.file',
|
||||
|
|
|
|||
|
|
@ -209,6 +209,7 @@ export const en = {
|
|||
'help.option.query.context': 'Task context to improve ranking',
|
||||
'help.option.query.goal': 'What you want to find',
|
||||
'help.option.query.limit': 'Max processes to return (default: 5)',
|
||||
'help.option.query.includeTests': 'Include test files in results',
|
||||
'help.option.content': 'Include full symbol source code',
|
||||
'help.option.repo.target': 'Target repository',
|
||||
'help.option.context.uid': 'Direct symbol UID (zero-ambiguity lookup)',
|
||||
|
|
|
|||
|
|
@ -195,6 +195,7 @@ export const zhCN = {
|
|||
'help.option.query.context': '用于提升排序质量的任务上下文',
|
||||
'help.option.query.goal': '你想查找的目标',
|
||||
'help.option.query.limit': '最多返回的流程数(默认:5)',
|
||||
'help.option.query.includeTests': '在结果中包含测试文件',
|
||||
'help.option.content': '包含完整符号源码',
|
||||
'help.option.repo.target': '目标仓库',
|
||||
'help.option.context.uid': '直接符号 UID(零歧义查找)',
|
||||
|
|
|
|||
|
|
@ -207,7 +207,7 @@ program
|
|||
.option('-g, --goal <text>', 'What you want to find')
|
||||
.option('-l, --limit <n>', 'Max processes to return (default: 5)')
|
||||
.option('--content', 'Include full symbol source code')
|
||||
.option('--include-tests', 'Include test files in results (default: false, matching impact)')
|
||||
.option('--include-tests', 'Include test files in results')
|
||||
.action(createLbugLazyAction(() => import('./tool.js'), 'queryCommand'));
|
||||
|
||||
program
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue