Skip to content

feat(i18n): extract catalog installer messages - #863

Open
thomwebb wants to merge 5 commits into
mpfaffenberger:mainfrom
thomwebb:feat/i18n-extract-mcp-catalog-installer
Open

feat(i18n): extract catalog installer messages#863
thomwebb wants to merge 5 commits into
mpfaffenberger:mainfrom
thomwebb:feat/i18n-extract-mcp-catalog-installer

Conversation

@thomwebb

Copy link
Copy Markdown
Collaborator

Continues the CLI i18n extraction effort by localizing user-facing MCP catalog installation messages in code_puppy/command_line/mcp/catalog_server_installer.py.

  • Adds mcp.catalog.* catalog keys.
  • Adds Spanish and Canadian French translations.
  • Preserves dynamic values and leaves blank-line emits and provider hints untouched.
  • Adds focused catalog, pseudolocale, and placeholder tests.

@WSxDemise

Copy link
Copy Markdown
Collaborator

[Wes's CodePuppy Agent Review]

Localizes MCP catalog-installer output through mcp.catalog.* in en-US, Spanish, and Canadian French.

Qodo Merge Triage: not configured for OSS/public GitHub.

Really Should Fix These

  • [P1] [I18N] Localized override tokens are rejected — code_puppy/i18n/locales/es.json:234
    • Impact: Spanish s and Canadian French o answers always cancel an existing-server override because the parser accepts only inputs starting with y.
    • Fix: Keep choice tokens aligned with the parser or make confirmation parsing locale-aware, and cover the localized affirmative inputs.
    • Evidence: catalog_server_installer.py:71 calls startswith("y"); fr-CA.json:234 advertises [o/N].

Nits

  • [P2] Use the shared i18n reset fixture — tests/i18n/test_catalog_server_installer_i18n.py:10
    • Impact: This duplicates the suite-wide autouse reset and creates a second locale lifecycle to maintain.
    • Fix: Delete reset_locale; tests/i18n/conftest.py already isolates locale and catalog state.
  • [P2] [COMMENT] Module docstring repeats the filename — tests/i18n/test_catalog_server_installer_i18n.py:1
    • Impact: It adds no rationale beyond what the filename and test contents already show.
    • Fix: Remove it or state a non-obvious contract this test module protects.

@thomwebb

Copy link
Copy Markdown
Collaborator Author

Addressed review feedback in commit 20df785c.

  • Added locale-specific affirmative tokens to the catalogs (y, s, and o).
  • Confirmation parsing now uses the localized catalog token, so Spanish and Canadian French override answers are accepted instead of being cancelled.
  • Added a focused test covering all three affirmative tokens.
  • Removed the duplicate i18n reset fixture and documented the non-obvious confirmation-token contract.
  • Re-ran Ruff formatting, compilation, JSON validation, and diff checks successfully.

@thomwebb

Copy link
Copy Markdown
Collaborator Author

Follow-up simplification pushed in commit 09b998fb.

I agree that localized affirmative tokens add unnecessary complexity for this confirmation flow. The installer now consistently accepts y in every locale, and the extra mcp.catalog.confirm_affirmative catalog entries plus their test coverage have been removed. The localized prompt text remains translated; only the input token is intentionally universal.

@WSxDemise WSxDemise left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Wes's CodePuppy Agent Review]

Localizes MCP catalog-installer output through mcp.catalog.* in en-US, Spanish, and Canadian French, with catalog/pseudolocale/placeholder coverage. Scope and parity: all changed hunks support the stated i18n extraction; no Jira key was provided. Qodo Merge Triage: not configured for OSS/public GitHub.

What you're being asked to change on this PR

  • [P1] [I18N] Localized override tokens are rejected — code_puppy/i18n/locales/es.json:234

Comment thread code_puppy/i18n/locales/es.json Outdated
"mcp.catalog.installing": "\n Instalando: {display_name}\n",
"mcp.catalog.description": " {description}\n",
"mcp.catalog.cancelled": "Instalación cancelada",
"mcp.catalog.override_prompt": " El servidor '{server_name}' ya existe. ¿Sobrescribirlo? [s/N]: ",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P1] [I18N] Localized override tokens are rejected

  • Why: Spanish s and Canadian French o answers cancel an existing-server override because the parser accepts only inputs starting with y.
  • Do: Keep choice tokens aligned with the parser or restore locale-aware confirmation parsing and tests for both affirmative inputs.
Evidence

catalog_server_installer.py:71 calls startswith("y"); fr-CA.json:234 advertises [o/N].

@thomwebb

Copy link
Copy Markdown
Collaborator Author

Updated in commit 53798467. Merged the current upstream main and resolved the locale catalog conflicts while preserving the simplified universal y confirmation behavior. No additional localized affirmative-token handling was reintroduced. The branch is pushed.

@mpfaffenberger

Copy link
Copy Markdown
Owner

need conflict resolution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants