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

Implement calling built-in Functions #19

Closed
stasm opened this issue Oct 2, 2017 · 5 comments
Closed

Implement calling built-in Functions #19

stasm opened this issue Oct 2, 2017 · 5 comments
Milestone

Comments

@stasm
Copy link
Contributor

stasm commented Oct 2, 2017

CallExpressions currently don't implement the ResolveValue trait. In the first iteration let's add a simple NUMBER() built-in which doesn't even take any additional arguments.

@zbraniecki What are our options for locale-aware number- and date-formatting?

@zbraniecki
Copy link
Collaborator

There are none. I have the fluent-locale crate almost ready which will add language negotiation and we can mock a simple PluralRules on it. I wanted to use it as the first builtin.

As for number/date formatting, I don't believe there's anything yet in Rust, but I expect things to start popping up soon. For now, we could just add a custom NUMBER function that transliterates to eastern arabic numerals if the language is ar.

@stasm stasm mentioned this issue Oct 12, 2017
@zbraniecki zbraniecki added this to the 0.6 milestone Jan 5, 2019
@zbraniecki
Copy link
Collaborator

@stasm - I think this is already fixed - you can add custom functions and they can be called. We still await a decent implementation of either NUMBER or DATETIME to provide built-ins.

Do you want to keep this issue open until we find and implement those two?

@zbraniecki
Copy link
Collaborator

closing as per lack of activity. reopen if needed.

@Xiretza
Copy link
Contributor

Xiretza commented Apr 25, 2024

I think this should be reopened, the built-in functions are still not implemented, which is either a bug in fluent-rs or in https://projectfluent.org/fluent/guide/functions.html.

@alerque
Copy link
Collaborator

alerque commented Apr 26, 2024

@Xiretza This issue has a lot of unrelated discussion about the implementation needed to have functions in the first place. I suggest opening a new issue (or issues) for the specific function(s) that need to be implemented to be a full spec implementation. That will make it easier to track. Thanks.

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

No branches or pull requests

4 participants