From 0e2648d1dff9160f71ee81dbaeaf1a9042e53cc5 Mon Sep 17 00:00:00 2001 From: scotjelinski <58397194+scotjelinski@users.noreply.github.com> Date: Wed, 27 May 2026 20:16:49 -0600 Subject: [PATCH] fix(query): wire --include-tests into i18n parity tables MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- gitnexus/src/cli/help-i18n.ts | 1 + gitnexus/src/cli/i18n/en.ts | 1 + gitnexus/src/cli/i18n/zh-CN.ts | 1 + gitnexus/src/cli/index.ts | 2 +- 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/gitnexus/src/cli/help-i18n.ts b/gitnexus/src/cli/help-i18n.ts index 8d620fc6f..65c571783 100644 --- a/gitnexus/src/cli/help-i18n.ts +++ b/gitnexus/src/cli/help-i18n.ts @@ -95,6 +95,7 @@ const OPTION_DESCRIPTION_KEYS = { 'query|-g, --goal ': 'help.option.query.goal', 'query|-l, --limit ': 'help.option.query.limit', 'query|--content': 'help.option.content', + 'query|--include-tests': 'help.option.query.includeTests', 'context|-r, --repo ': 'help.option.repo.target', 'context|-u, --uid ': 'help.option.context.uid', 'context|-f, --file ': 'help.option.context.file', diff --git a/gitnexus/src/cli/i18n/en.ts b/gitnexus/src/cli/i18n/en.ts index 51cbc2816..5d55a2829 100644 --- a/gitnexus/src/cli/i18n/en.ts +++ b/gitnexus/src/cli/i18n/en.ts @@ -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)', diff --git a/gitnexus/src/cli/i18n/zh-CN.ts b/gitnexus/src/cli/i18n/zh-CN.ts index 2a1374fc6..865f3e20e 100644 --- a/gitnexus/src/cli/i18n/zh-CN.ts +++ b/gitnexus/src/cli/i18n/zh-CN.ts @@ -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(零歧义查找)', diff --git a/gitnexus/src/cli/index.ts b/gitnexus/src/cli/index.ts index e76144525..14ed09ec8 100644 --- a/gitnexus/src/cli/index.ts +++ b/gitnexus/src/cli/index.ts @@ -207,7 +207,7 @@ program .option('-g, --goal ', 'What you want to find') .option('-l, --limit ', '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