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

Doc request? #196

Open
EvanCarroll opened this issue Apr 21, 2021 · 1 comment
Open

Doc request? #196

EvanCarroll opened this issue Apr 21, 2021 · 1 comment
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers help wanted Extra attention is needed

Comments

@EvanCarroll
Copy link

I'm not even sure what I'm reading.. Is this not made for users at all because it's low level?

Where is the simple "hello world" example, with instructions on how to get to/from xliff? This crate is the first thing that comes up when you search for icu messageformat rust.

@filmil
Copy link
Member

filmil commented Apr 21, 2021

I'm not even sure what I'm reading.. Is this not made for users at all because it's low level?

Hello @EvanCarroll, I agree that documentation could be better.

Since rust_icu is really a wrapper on top of ICU4C, we're kind of piggybacking off the documentation available there. Sadly, while in theory we'd be able to take the API documentation over from ICU4C, in practice rustdoc gets confused about inline C++ code examples, so we had to turn documentation transfer off. This makes the documentation situation a bit worse than it otherwise would have been. Sorry about that.

The canonical place for rustdocs is at https://docs.rs/crate/rust_icu/ and the repo here is open for contributions. The reality is that you may end up being a trailblazer, in which case a PR that documents the things you learned along the way would be most welcome.

Where is the simple "hello world" example, with instructions on how to get to/from xliff? This crate is the first thing that comes up when you search for icu messageformat rust.

ICU doesn't really deal with L10N interchange formats, so it doesn't really have an answer for what to do with or how to maintain XLIFF files. Decisions on how I18N-ize your code, or bundle L10N resources and load them for use is out of its scope, and hence it is out of the scope of rust_icu too. You will see the same thing at the official ICU docs: https://unicode-org.github.io/icu/userguide/format_parse/messages/ While they explain how message formatting works, there is no word about interchange formats.

What ICU does provide for you in this workflow is the message formatter, which you can think of as a glorified locale-sensitive printf.

Could you be a bit more specific what you are trying to achieve? Perhaps that way we can work out together how you can get there despite the obvious deficiencies of rust_icu docs.

@filmil filmil added documentation Improvements or additions to documentation good first issue Good for newcomers help wanted Extra attention is needed labels Aug 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants