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

Test Fluent.js for complex accessibility strings #992

Open
jessegreenberg opened this issue Nov 14, 2024 · 6 comments
Open

Test Fluent.js for complex accessibility strings #992

jessegreenberg opened this issue Nov 14, 2024 · 6 comments

Comments

@jessegreenberg
Copy link
Contributor

jessegreenberg commented Nov 14, 2024

After #990, we are going to try Fluent.js to support i18n for complex accessibility strings.

In this issue Ill track changes and progress. First, we are going to bring Fluent in as a dependency. Then, we are going to try it out with 3 sims. We are then going to test the strings with translators to get feedback.

EDIT: I have a growing list of branches in repos as we do this work. Collected in this coment: #992 (comment)

@jessegreenberg
Copy link
Contributor Author

The latest version of Fluent.js was not compatible with our preload system/sherpa which requires a standalone built file. We found a build in this format at https://www.npmjs.com/package/fluent. It is 5 years old.

We will want to figure out how we can get the latest version. For other POSE reasons, PhET is exploring how we can use a more standard way of importing dependencies. But if that isn't figured out, we will need to find a way to bundle a more recent version of Fluent so it can be used in sherpa.

@jessegreenberg
Copy link
Contributor Author

The above commits complete a first pass at using Fluent in ohms-law for accessibility strings.

jessegreenberg added a commit to phetsims/ohms-law that referenced this issue Nov 22, 2024
jessegreenberg added a commit to phetsims/chipper that referenced this issue Nov 22, 2024
jessegreenberg added a commit to phetsims/chipper that referenced this issue Nov 22, 2024
@jessegreenberg
Copy link
Contributor Author

jessegreenberg commented Nov 22, 2024

I am making a branch in chipper called fluent to hold preloads and utility classes that are supporting this work. See #1532.

jessegreenberg added a commit to phetsims/chipper that referenced this issue Nov 22, 2024
jessegreenberg added a commit to phetsims/ohms-law that referenced this issue Nov 22, 2024
jessegreenberg added a commit to phetsims/gravity-force-lab-basics that referenced this issue Nov 22, 2024
jessegreenberg added a commit to phetsims/gravity-force-lab-basics that referenced this issue Nov 25, 2024
@jessegreenberg
Copy link
Contributor Author

jessegreenberg commented Nov 25, 2024

GFL:B is proving to be too time consuming for this test because of the complicated string patterns. Strings are factored out and reassembled with code in a way that is good for English but is not friendly for i18n. We are going to switch to MaL instead.

@jessegreenberg
Copy link
Contributor Author

jessegreenberg commented Nov 25, 2024

List of repo branches so far to support this work:

  • chipper fluent - With classes and utility functions for working with fluent messages, and as Properties for dynamic locales.
  • ohms-law fluent - Sim implementation.
  • greenhouse-effect fluent - Sim implementation for molecules-and-light (molecules-and-light code lives in greenhouse-effect)
  • molecules-and-light fluent- Preloads for fluent need to be defined in its package.json, even though it pulls from greenhouse-effect.
  • perennial fluent - TypeScript in chipper requires Fluent files to be declared in this file.

jessegreenberg added a commit to phetsims/perennial that referenced this issue Nov 25, 2024
jessegreenberg added a commit to phetsims/greenhouse-effect that referenced this issue Nov 26, 2024
jessegreenberg added a commit to phetsims/greenhouse-effect that referenced this issue Nov 26, 2024
jessegreenberg added a commit to phetsims/scenery-phet that referenced this issue Nov 26, 2024
jessegreenberg added a commit to phetsims/greenhouse-effect that referenced this issue Nov 26, 2024
jessegreenberg added a commit to phetsims/greenhouse-effect that referenced this issue Nov 26, 2024
@jessegreenberg
Copy link
Contributor Author

The above commits complete a first pass at using Fluent in molecules-and-light for accessibility strings.

jessegreenberg added a commit to phetsims/greenhouse-effect that referenced this issue Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant