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 MessageFormat #263

Open
kpozin opened this issue Mar 6, 2019 · 2 comments
Open

Implement MessageFormat #263

kpozin opened this issue Mar 6, 2019 · 2 comments
Labels
A: lib-api Library API A: lib-impl Library Implementation C: locale-data Locale Data & CLDR C: trans-api feature New features requested or planned

Comments

@kpozin
Copy link

kpozin commented Mar 6, 2019

See http://userguide.icu-project.org/formatparse/messages#TOC-MessageFormat.

Basic requirements:

  • Creating a MessageFormat object from a format string and a locale, with format string validation.
  • Accepting named or ordered arguments (HashMap or slice) to format a message.
@behnam behnam added C: locale-data Locale Data & CLDR A: lib-impl Library Implementation A: lib-api Library API C: trans-api labels Apr 1, 2019
@behnam
Copy link
Member

behnam commented Apr 1, 2019

Thanks, @kpozin, for filing this.

My plans for UNIC has been to provide at least the same level of functionality as ICU for the Rust ecosystem, but not necessarily follow the same API and system design. (More details re MessageFormat below.) But, that said, I'm not against also supporting MessageFormat, specially as a way to enable compatibility with / migration of existing systems.


Specifically, IMHO MessageFormat is one of the main pieces of ICU that is not well-suited/scalable to various cultures, b/c of its design decision to keep all branchings needed for a template inside one string.

B/c of that, my plan for UNIC's L10n/Translation API is to: 1) integrate with Fluent, and 2) support inline source templates with pre-expanded translation templates, probably reusing a large portion of XLIFF's design for the translation templates.

@zbraniecki
Copy link
Member

One additional point is that we do have a vague plan to work with Unicode on using Fluent as the base for some form of "MessageFormat 2.0".

@behnam behnam added the feature New features requested or planned label Apr 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: lib-api Library API A: lib-impl Library Implementation C: locale-data Locale Data & CLDR C: trans-api feature New features requested or planned
Projects
None yet
Development

No branches or pull requests

3 participants