-
Notifications
You must be signed in to change notification settings - Fork 78
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
Additional variable types / Temproal support #634
Comments
This was referenced Feb 12, 2025
Example of what the API could look like: new FluentBundle(locales, {
wrapVariable(value: Temporal.ZonedDateTime | FluentVariable): FluentVariable {
if(value instanceof Temporal.ZonedDateTime) {
return new FluentDateTime(value.epochMilliseconds, { timeZone: value.timeZoneId })
} else {
return value
}
}
}) |
The library's still maintained, but new feature development is indeed not very active. I'd be very interested in reviewing new PRs, including ones bringing in Temporal support. |
Pull Request: #635 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently, fluent-bundle cannot handle Temporal.
What would need to change
It is hardcoded only to support FluentVariable entries (FluentType, string, number, or Date).
Here's how they are resolved:
fluent.js/fluent-bundle/src/resolver.ts
Lines 178 to 200 in 48e2a62
It is, therefore, not possible to pass in other values.
Possible fixes
The first one would be very convenient but would also require checking whether Temporal exists.
Project status
As a side note, I'm seeing a lot of old issues with no progress. I'm happy to work on a PR for this, but I'm wondering what the maintenance status of the project is.
The text was updated successfully, but these errors were encountered: