Closed Bug 1834205 Opened 2 years ago Closed 1 year ago

Convert FluentSyntax.jsm to an ES module

Categories

(Core :: Internationalization, task)

task

Tracking

()

RESOLVED DUPLICATE of bug 1844956

People

(Reporter: standard8, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [esmification-timeline])

As part of the ongoing work, we should convert FluentSyntax.jsm to an ES module.

It appears it is a third-party file imported from https://github.com/projectfluent/fluent.js/, although it hasn't been updated since 2019.

It looks like the project creates the file, so we might want to update the file to the latest version, then update the project. This issue in the project may also be relevant as it is about supporting ES modules.

The FluentSyntax.jsm is only used for a single test case, so maybe we should just try to avoid the dependency on fluent.js entirely now. Maybe it is possible to use https://docs.rs/fluent/latest/fluent/struct.FluentResource.html#method.entries in fluent-rs? It could be somehow exposed on the FluentResource webidl so that most of the plumbing could be reused.

Is it possible we could get someone to work on this in early/mid H2? We'd like to try and round out this phase of the esm-ification project.

Bug 1844956 moves the AST traverse from JS to Rust, and removes FluentSyntax.jsm.

Status: NEW → RESOLVED
Closed: 1 year ago
Duplicate of bug: 1844956
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.