Skip to content

[Maintainer] i18n follow-ups from the #1148 review #1155

Open

Description

@Aymericr

Deferred P2 findings from the Codex review of #1148 (#1148 (review)). They'll be handled in the i18n migration PRs that follow #1148.

  • Placeholder validation depth (scripts/i18n.ts): catch renumbered tags, broken nesting, removed select branches and missing other branches in translated messages.
  • Per-locale entry points (locales.ts): load only the active locale's catalog instead of bundling all five up front.
  • Plural rules for fallback messages (registry.ts): a pt message used for pt-PT should use pt's plural rules, not pt-PT's.
  • In-app ?lang= navigation (layout.tsx): switch the language on client navigation without a reload.

Next owner: Maintainer.

Activity

  1. Aymericr commented on Oct 27, 2026

    @Aymericr
    MemberAuthor

    One more item from Security's review of #1148 (L1):

  2. Aymericr commented on Oct 27, 2026

    @Aymericr
    MemberAuthor

    One more item from Security's review of #1148 (L2b):

    • Stricter tag check in scripts/i18n.ts (~line 195): <img/src=x onerror=...>, <svg/onload=...> and <!-- --> still get past tag validation. It isn't exploitable, because translations render as text. To fix it, treat any < followed by a letter, ! or / as a tag, and add test cases.
  3. Aymericr commented on Oct 27, 2026

    @Aymericr
    MemberAuthor

    #1148 merged as 374b781. One more item from Tooling's review:

    • Test speed: bun run test now runs the i18n script tests outside Turbo's cache, which takes about 66s locally. Move them into a cached Turbo task, or scope them to changes under scripts/.

    Bugbot's open findings on #1148 (scoped-locale parse, decimal write-back, floor-plan number formatting, SSR snapshot) are being fixed in a separate follow-up PR, not tracked here.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions