Skip to content

bug: Potentially unexpected output given the "*" operator #361

Description

@dpchamps

While authoring #360, I noticed a potentially unexpected edge case while using the * operator:

Let's say I'm authoring some messages, and I want to be overly terse:

const messagePacks = {
    "en": {
      es: "Estimation Date: {date, date, ::EEEMMMd}",
      fi: "Financial Incentive Date: {date, date, ::EEEMMMd}",
    },
  };

If I were to compile this against the new MessageFormat("*") invocation, I'm going to get very unexpected output. Namely, spanish and finnish localized dates.

See the repro here: https://github.com/dpchamps/mf-locale-collision-repro

Idea for a fix: we could add an optional arg to compile to indicate isRecursing, and then not pull from the plurals at all.

Activity

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions