Skip to content

fix(i18n): unescape HTML entities in UI strings - #9721

Closed
dionjoshualobo wants to merge 0 commit into
diegosouzapw:release/v3.8.50from
dionjoshualobo:fix/i18n-unescape-html-entities
Closed

fix(i18n): unescape HTML entities in UI strings#9721
dionjoshualobo wants to merge 0 commit into
diegosouzapw:release/v3.8.50from
dionjoshualobo:fix/i18n-unescape-html-entities

Conversation

@dionjoshualobo

Copy link
Copy Markdown
Contributor

Summary

Fixes HTML entity escaping (&lt; and &gt;) being rendered literally in the UI instead of as angle brackets. Replaces escaped entities with raw < and > characters in the English source strings and synchronizes the updated placeholder strings across all 42 locale files.

Before: UI showed claude/&lt;provider&gt;/&lt;model&gt;
After: UI shows claude/<provider>/<model>

Related Issues

  • Closes #
  • Related to #

Validation

Choose the change type and focused loop from the
Contribution Golden Path. The full unit suite,
Vitest, the 60% coverage gate, and the production build all run in CI on this PR (#8329):

  • Change type: i18n
  • Focused tests and category gates from the golden path
    • npm run i18n:sync-ui:dry
    • npm run i18n:check-ui-coverage
    • npm run i18n:check-value-drift (pre-existing stale translations in it and ru)
    • npm run i18n:check-glossary
    • npm run check:cli-i18n
    • npm run lint (currently fails due to unrelated pre-existing tests/unit/vertex-functioncall-id-3440.test.ts ESLint errors)
  • Reconciled with the current active release base; focused checks rerun afterward
  • Production-code changes include a new or updated automated test in this PR
  • SonarQube PR analysis is green or any remaining issues are explicitly documented below

Tests Added Or Updated

  • No automated tests were added or modified.
  • This PR only updates i18n locale message files.

Coverage Notes

This PR modifies only locale JSON files under src/i18n/messages/ and does not change application logic.

Coverage is not affected because no executable code was modified.

Reviewer Notes

  • This is a data-only i18n change.
  • The change updates placeholder English strings used as locale fallbacks by replacing escaped HTML entities (&lt; / &gt;) with literal angle brackets (< / >).
  • All affected locale files have been synchronized with the updated English source strings.
  • i18n:check-value-drift currently reports pre-existing stale translations for three keys in the Italian (it) and Russian (ru) locales.
  • npm run lint currently reports unrelated pre-existing ESLint errors in tests/unit/vertex-functioncall-id-3440.test.ts.

Copilot AI lite review requested due to automatic review settings August 7, 2026 17:20

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates UI locale message catalogs under src/i18n/messages/ to stop rendering double-escaped angle-bracket placeholders (e.g. &amp;lt;provider&amp;gt;) and synchronizes the resulting English source-string changes across all supported locales.

Changes:

  • Replace HTML-entity placeholders like &lt;provider&gt; / &lt;model&gt; with literal <provider> / <model> in Claude Code discovery-alias related UI strings across locales.
  • Update the OmniGlyph “gates” explanatory string that embeds a <code> snippet (but see review comment about rich-text parsing).
  • Sync locale files (reordering and adding/removing keys) as part of the UI i18n synchronization.

Commands run (custom):

  • None (review only; relied on provided diffs and code inspection).

Coverage result (custom):

  • Not evaluated here (data-only JSON changes; no executable code changes expected).

Reviewed changes

Copilot reviewed 43 out of 43 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/i18n/messages/ar.json Locale sync for updated placeholder strings and related UI keys
src/i18n/messages/az.json Locale sync for updated placeholder strings and related UI keys
src/i18n/messages/bg.json Locale sync for updated placeholder strings and related UI keys
src/i18n/messages/bn.json Locale sync for updated placeholder strings and related UI keys
src/i18n/messages/cs.json Locale sync for updated placeholder strings and related UI keys
src/i18n/messages/da.json Locale sync for updated placeholder strings and related UI keys
src/i18n/messages/de.json Locale sync for updated placeholder strings and related UI keys
src/i18n/messages/en.json Source English string updates for angle-bracket placeholders and OmniGlyph copy
src/i18n/messages/es.json Locale sync for updated placeholder strings and related UI keys
src/i18n/messages/fa.json Locale sync for updated placeholder strings and related UI keys
src/i18n/messages/fi.json Locale sync for updated placeholder strings and related UI keys
src/i18n/messages/fr.json Locale sync for updated placeholder strings and related UI keys
src/i18n/messages/gu.json Locale sync for updated placeholder strings and related UI keys
src/i18n/messages/he.json Locale sync for updated placeholder strings and related UI keys
src/i18n/messages/hi.json Locale sync for updated placeholder strings and related UI keys
src/i18n/messages/hu.json Locale sync for updated placeholder strings and related UI keys
src/i18n/messages/id.json Locale sync for updated placeholder strings and related UI keys
src/i18n/messages/in.json Locale sync for updated placeholder strings and related UI keys
src/i18n/messages/it.json Locale sync for updated placeholder strings and related UI keys
src/i18n/messages/ja.json Locale sync for updated placeholder strings and related UI keys
src/i18n/messages/ko.json Locale sync for updated placeholder strings and related UI keys
src/i18n/messages/mr.json Locale sync for updated placeholder strings and related UI keys
src/i18n/messages/ms.json Locale sync for updated placeholder strings and related UI keys
src/i18n/messages/nl.json Locale sync for updated placeholder strings and related UI keys
src/i18n/messages/no.json Locale sync for updated placeholder strings and related UI keys
src/i18n/messages/phi.json Locale sync for updated placeholder strings and related UI keys
src/i18n/messages/pl.json Locale sync for updated placeholder strings and related UI keys
src/i18n/messages/pt-BR.json Locale sync for updated placeholder strings and related UI keys
src/i18n/messages/pt.json Locale sync for updated placeholder strings and related UI keys
src/i18n/messages/ro.json Locale sync for updated placeholder strings and related UI keys
src/i18n/messages/ru.json Locale sync for updated placeholder strings and related UI keys
src/i18n/messages/sk.json Locale sync for updated placeholder strings and related UI keys
src/i18n/messages/sv.json Locale sync for updated placeholder strings and related UI keys
src/i18n/messages/sw.json Locale sync for updated placeholder strings and related UI keys
src/i18n/messages/ta.json Locale sync for updated placeholder strings and related UI keys
src/i18n/messages/te.json Locale sync for updated placeholder strings and related UI keys
src/i18n/messages/th.json Locale sync for updated placeholder strings and related UI keys
src/i18n/messages/tr.json Locale sync for updated placeholder strings and related UI keys
src/i18n/messages/uk-UA.json Locale sync for updated placeholder strings and related UI keys
src/i18n/messages/ur.json Locale sync for updated placeholder strings and related UI keys
src/i18n/messages/vi.json Locale sync for updated placeholder strings and related UI keys
src/i18n/messages/zh-CN.json Locale sync for updated placeholder strings and related UI keys
src/i18n/messages/zh-TW.json Locale sync for updated placeholder strings and related UI keys

Comment thread src/i18n/messages/en.json Outdated
Comment thread src/i18n/messages/en.json Outdated
"featureFlagOmnirouteEmergencyFallbackDescription": "Route budget-exhausted requests to the emergency free fallback provider/model.",
"featureFlagArenaEloSyncEnabledDescription": "Enable periodic Arena AI leaderboard ELO sync for model intelligence rankings.",
"featureFlagExposeCcDiscoveryAliasesDescription": "Advertise claude/&lt;provider&gt;/&lt;model&gt; mirror ids on /v1/models so Claude Code gateway model discovery lists non-Claude models. Warning: doubles catalog entries for all clients when enabled globally.",
"featureFlagExposeCcDiscoveryAliasesDescription": "Advertise claude/<provider>/<model> mirror ids on /v1/models so Claude Code gateway model discovery lists non-Claude models. Warning: doubles catalog entries for all clients when enabled globally.",
@diegosouzapw

Copy link
Copy Markdown
Owner

Thanks for the PR. Please address the mandatory items (tests and/or merge blockers) in this branch, then rerun checks before /merge-prs.

3 similar comments
@diegosouzapw

Copy link
Copy Markdown
Owner

Thanks for the PR. Please address the mandatory items (tests and/or merge blockers) in this branch, then rerun checks before /merge-prs.

@diegosouzapw

Copy link
Copy Markdown
Owner

Thanks for the PR. Please address the mandatory items (tests and/or merge blockers) in this branch, then rerun checks before /merge-prs.

@diegosouzapw

Copy link
Copy Markdown
Owner

Thanks for the PR. Please address the mandatory items (tests and/or merge blockers) in this branch, then rerun checks before /merge-prs.

@diegosouzapw

Copy link
Copy Markdown
Owner

Obrigado pelo PR. Mantive a revisão de fix-in-place e não foi possível concluir o ajuste completo aqui:

  • Para os PRs em fork: não consigo aplicar push de correção diretamente na sua branch.
    Por favor, faça um rebase/sync com release/v3.8.50, resolva conflitos se houver, e rode os checks dessa branch.
    Se preferir, posso aplicar a correção na próxima rodada assim que você mandar o branch atualizado ou confirmar que o PR está limpo pra esse merge.

@dionjoshualobo
dionjoshualobo force-pushed the fix/i18n-unescape-html-entities branch from 07be601 to db2e7f7 Compare August 9, 2026 17:01
@dionjoshualobo

Copy link
Copy Markdown
Contributor Author

I have fixed the merge conflicts. The failing checks are non-blocking and advisory, and do not have anything to do with the changes in this PR.

@diegosouzapw
diegosouzapw force-pushed the fix/i18n-unescape-html-entities branch from db2e7f7 to 5fd2325 Compare August 11, 2026 01:09
@diegosouzapw

Copy link
Copy Markdown
Owner

This PR's change (unescaping claude/&lt;provider&gt;/&lt;model&gt;claude/<provider>/<model> in the CC discovery-alias keys featureFlagExposeCcDiscoveryAliasesDescription, ccDiscoveryInfoTooltip, ccAliasSectionHint across locales) is fully superseded by upstream fix #9917 (fix(i18n): re-escape CC discovery-alias angle brackets for next-intl).

#9917 deliberately keeps those angle brackets HTML-entity ESCAPED because next-intl interprets raw claude/<provider>/<model> as rich-text tags and logs INVALID_MESSAGE/UNCLOSED_TAG on provider detail pages. It also added the regression guard tests/unit/i18n-cc-alias-unclosed-tags.test.ts, which asserts the escaped form across all locales and passes on the release tip.

Rebasing this branch onto release/v3.8.50 and resolving the resulting conflicts in favor of the release state (escaped form + existing regression test) yields a branch identical to the release tip (no net change). The proposed unescape is thus obsolete and should not be merged.

@mergify

mergify Bot commented Aug 11, 2026

Copy link
Copy Markdown

⚠️ The sha of the head commit of this PR conflicts with #8875. Mergify cannot evaluate rules on this PR. Once #8875 is merged or closed, Mergify will resume processing this PR. ⚠️

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