microsoft / microsoft/aspire

Teach Copilot code review to flag missing localization

Open
#19,410 1 comment 0 reactions 0 assignees View on GitHub
area-cli area-engineering-systems area-vscode enhancement localization
Dominant language
C#
Stars
6.3k
Forks
991
Avg merge
2d 15h
Merged PRs (30d)
196

Description

### Is your feature request related to a problem?

Hardcoded user-facing strings can still be introduced in localized Aspire surfaces. We have clear localization patterns for the Dashboard, CLI, and VS Code extension, but this is easy to miss during review.

The existing automatic Copilot reviewer should be able to catch these without adding another agentic workflow that reads the same diff and leaves a second review.

### Describe the solution you'd like

Add explicit path-specific Copilot review instructions for newly added or changed hardcoded user-facing strings:

- strengthen `.github/instructions/dashboard.instructions.md`
- add equivalent instructions for `src/Aspire.Cli/**/*.cs`
- add equivalent instructions for the relevant `extension/src/**` files and `extension/package.json`

GitHub's automatic reviewer consumes `.github/instructions/`. `.agents/skills/code-review/SKILL.md` is used for manual `/code-review` runs, so I think we should update that too and keep both review paths consistent.

The reviewer should flag high-confidence literals used as labels, tooltips, dialog text, notifications, prompts, help descriptions, progress text, or user-facing errors when they bypass the localization mechanism for that surface:

- Dashboard: use the appropriate resource-backed localizer and base `.resx`.
- CLI: use the appropriate resource `.resx` for output, prompts, help, and user-facing errors.
- VS Code extension: add code-displayed strings to both `extension/src/loc/strings.ts` and `extension/package.nls.json`; use `%placeholder%` entries for `package.json` contribution text.

It should not flag tests, docs, generated or translated files, protocol values, identifiers, URLs, telemetry, internal logs, or other clearly invariant/non-user-facing strings.

### Acceptance criteria

- Copilot automatic review has explicit path-specific guidance for missing localization in Dashboard, CLI, and extension changes.
- The manual `/code-review` skill applies the same localization rubric.
- Findings are limited to added or changed user-facing strings and include the expected localization fix.
- Already-localized and non-user-facing literals do not receive findings.
- We do not add a second agentic PR reviewer for this.

Contributor guide

Open the contributing guide

Research direction

Read .github/instructions/dashboard.instructions.md and .agents/skills/code-review/SKILL.md first, then inspect the existing localization guidance for src/Aspire.Cli/**/*.cs, extension/src/**, and extension/package.json. Keep the automatic and manual review rubrics consistent, and verify the acceptance criteria: changed user-facing literals are flagged with the expected localization fix while tests, docs, generated files, invariant strings, and already-localized text are ignored.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, github, typescript
Domain
internationalization, tooling
Issue type
Feature
Difficulty
3/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
67/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.