Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
dpchamps opened this issue Feb 25, 2022 · 1 comment · May be fixed by #362
Open

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

dpchamps opened this issue Feb 25, 2022 · 1 comment · May be fixed by #362
Labels

Comments

@dpchamps
Copy link
Contributor

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.

@eemeli
Copy link
Member

eemeli commented Feb 27, 2022

Yeah, this feels like a bug, and rather unlikely to affect real-world users in a way that anyone would (should?) depend on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants