projectfluent / fluent-rs

Rust implementation of Project Fluent
https://projectfluent.org
Apache License 2.0
1.07k stars 96 forks source link

Improve the documentation on `FluentBundle::format_pattern` #156

Closed XAMPPRocky closed 3 years ago

XAMPPRocky commented 4 years ago

Hello, I was updating some dependencies and between version 0.5 -> 0.9, FluentBundle::format was removed in place of FluentBundle::format_pattern, however there is no documentation on how to use format_pattern. And there is no documentation how to construct a fluent_syntax::ast::Pattern to be able to pass to the function. I would really appreciate if there was some end user documentation on how to use this function.

zbraniecki commented 4 years ago

Hi!

I recognize that the current documentation is suboptimal. I'm sorry for that, I've been focused on completing the feature set first.

Please, consult the fluent_bundle/examples/ directory for examples on how to use the new API.

Let me know if you find the answers there! hello.rs should be a good start :)

zbraniecki commented 4 years ago

I will keep this open with a plan to improve the docs on format_pattern to explain where the Pattern should come from.

zbraniecki commented 3 years ago

I landed a bunch of docs for get_message, format_pattern and write_pattern with examples.