Skip to content

localization: catalog test cannot see argument-order drift when specifiers share a type #1331

Closed

Description

@iamtoruk

Found while landing #1330. LocalizationCatalogTests compares the specifier list of each key across en and zh-Hans, so a key whose placeholders are all %@ passes even when the Chinese value puts the arguments in the wrong slots. Three such keys shipped with swapped slots in the early-reset copy and were only caught by rendering real data bilingually. Fix: use positional specifiers (%1$@, %2$@) in every multi-argument key so order is explicit and checkable, and have the test require positional form whenever a key has two or more placeholders. Also still unseen by the source scanner: Text(cond ? "A" : "B"), a literal assigned to a let then passed to .help, and prefix + "literal".

Activity

  1. added
    bug
    area: menubar
    status: confirmed
    on Sep 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: menubarbugstatus: confirmed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions