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] The string activity-needed-calculation-plural is unnecessarily complex #3907

Open
eemeli opened this issue Jan 16, 2023 · 1 comment · May be fixed by #3909
Open

[BUG] The string activity-needed-calculation-plural is unnecessarily complex #3907

eemeli opened this issue Jan 16, 2023 · 1 comment · May be fixed by #3909
Labels

Comments

@eemeli
Copy link
Contributor

eemeli commented Jan 16, 2023

Describe the bug
Right now, this string breaks Pontoon in Welsh, as lifting the selectors to the message's top level results in 6^4 = 1296 variants. It's also unnecessarily complex, given that its input values are and have always been hard-coded:

<Localized
id="activity-needed-calculation-plural"
vars={{
totalHours: 10000,
periodMonths: 6,
people: 1000,
clipsPerDay: 45,
}}>

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://pontoon.mozilla.org/ru/common-voice/web/locales/en/messages.ftl/?string=213590
  2. Observe that an excessive number of edit boxes are presented.
  3. Go to https://pontoon.mozilla.org/cy/common-voice/web/locales/en/messages.ftl/?string=213590
  4. Observe that the browser freezes, and eventually asks the user to stop the script.

Expected behavior
The message should not presume that the fixed inputs are actually variable. Here's a valid alternative that's much easier to translate:

activity-needed-calculation-plural =
  10,000 hours is achievable in just over 6 months if 1,000 people record 45 clips a day.

Screenshots
Screenshot 2023-01-16 at 11 38 47

Additional context
mozilla/pontoon#2703

It should not count as a feature that this particular string is one we tend to use to stress-test Fluent, as it's the most complex one in all of Mozilla's localizations.

@eemeli eemeli added the Bug label Jan 16, 2023
@eemeli eemeli linked a pull request Jan 17, 2023 that will close this issue
3 tasks
@eemeli
Copy link
Contributor Author

eemeli commented Jan 23, 2023

This string is now getting special treatment in Pontoon so that it at least doesn't break the UI for localisers.

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.

1 participant