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

Better docs #36

Open
dhardy opened this issue May 17, 2023 · 0 comments
Open

Better docs #36

dhardy opened this issue May 17, 2023 · 0 comments

Comments

@dhardy
Copy link

dhardy commented May 17, 2023

This crate looks nice but before attempting to use it I'd like to see better documentation.

From what I can tell:

  • i18n! must be called from the crate root; it generates items which are expected to be found in the crate root
  • t! returns a String
  • t!("foo", x = 1) is equivalent to t!("foo", x => 1) (why support both?)
  • t!("foo", locale = "en") — parameter locale has special handling
  • Unused parameters like t!("foo", unused_param=5) are allowed and ignored
  • Passing tuples or structs as parameters is not supported
  • Every passed parameter must support std::fmt::Display (even if unused)
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

1 participant