feat(i18n): extract custom_server_installer.py user-facing strings - #788
Open
thomwebb wants to merge 2 commits into
Open
feat(i18n): extract custom_server_installer.py user-facing strings#788thomwebb wants to merge 2 commits into
thomwebb wants to merge 2 commits into
Conversation
Continues the CLI i18n extraction effort by migrating the 'Add Custom
MCP Server' prompt flow (code_puppy/command_line/mcp/custom_server_installer.py)
- the current runner-up in python -m code_puppy.i18n.audit after
add_model_menu.py.
- Wraps all 20 non-blank emit_info/emit_warning/emit_error/emit_success
literals with t() calls under a new mcp.custom_server.* namespace.
- Adds en-US, es, and fr-CA translations for all 20 keys (parity verified).
- Leaves emit_info("") blank-line calls and safe_input() prompts alone,
consistent with the established scope from the add_model_menu.py
extraction (PUP-473/480).
- Adds tests/i18n/test_custom_server_installer_i18n.py mirroring the
per-module i18n test pattern (namespace population, resolution,
pseudolocalization, interpolation).
File coverage per the audit tool: 0% -> 82.8% (remaining 5 raw sites are
blank emit_info("") calls with no translatable text). Repo-wide coverage
26.7% -> 26.9%.
…JSON Matches the existing convention in these files (e.g. mcp.wizard.header already stores its emoji as a literal UTF-8 character, not \uXXXX). No content or key changes -- purely a JSON encoding fixup for the four lines I introduced with escaped emoji (heavy plus sign, pager, globe, satellite antenna).
thomwebb
force-pushed
the
feat/i18n-extract-mcp-custom-server-installer
branch
from
August 17, 2026 21:23
2b3166c to
7967efd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Continues the CLI i18n extraction effort (PUP-473 / PUP-480, see Jira) by migrating the 'Add Custom MCP Server' prompt flow (
code_puppy/command_line/mcp/custom_server_installer.py) — the current runner-up inpython -m code_puppy.i18n.auditright afteradd_model_menu.py(PR #706).How
emit_info/emit_warning/emit_error/emit_successliterals witht(...)calls under a newmcp.custom_server.*catalog namespace.emit_info("")calls and thesafe_input()prompt strings untouched, matching the scope precedent set by theadd_model_menu.pyextraction (nothing to translate in a blank string; prompts are out of the audit tool's tracked call set).tests/i18n/test_custom_server_installer_i18n.py, mirroring the existing per-module i18n test pattern: namespace population floor, key resolution, pseudolocalization, and interpolation checks.Verification
python -m code_puppy.i18n.audit code_puppy/command_line/mcp/custom_server_installer.py: 0% → 82.8% coverage (remaining 5 sites are blank-stringemit_info("")calls).custom_server_installer.pyno longer appears in the top-10 offenders list.ruff checkclean on all changed files.tests/command_line/mcp/test_custom_server_installer.py) +tests/i18n/suite: 175 passed, 0 failed.