Fluent.Net icon indicating copy to clipboard operation
Fluent.Net copied to clipboard

build in NUMBER function

Open LokiMidgard opened this issue 6 years ago • 1 comments

If I've seen it correctly the current implementation of the number function does nothing.

What are your plans for the future?

  • Do you intent to provided the same parameter that the reference implementation has?
  • Do you will provide the options c# offers for formating?
  • Just keep this as a placeholder so messages copied to c# will not throw errors (but won't get treated differently)

LokiMidgard avatar Apr 23 '19 08:04 LokiMidgard

Do you intent to provided the same parameter that the reference implementation has? Yes, eventually that was the intention -- we are using fluent and the same set of translations for everything, so the c# version on the backend and the JS version on the client side. Currently we don't have any number formatting requirements though so I haven't implemented it yet.

Do you will provide the options c# offers for formating? It would be the options the JS implementation provides (Intl.NumberFormat) -- I need to find, port or create a c# implementation of that.

Just keep this as a placeholder so messages copied to c# will not throw errors (but won't get treated differently) If you wanted to do that, you could just add a different implementation to MessageContext.Functions -- supplied function implementations will be used in preference to the built in ones.

blushingpenguin avatar Apr 24 '19 14:04 blushingpenguin