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

Need a way to incorporate i18n behaviors in display #283

Closed
kesmit13 opened this issue Apr 29, 2021 · 5 comments
Closed

Need a way to incorporate i18n behaviors in display #283

kesmit13 opened this issue Apr 29, 2021 · 5 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@kesmit13
Copy link

The display(...) directive in snafu accepts a particular format of string for doing formatted substitutions. Is there a way to incorporate translated strings in this? Having a way to integrate with something like fluent where the substitution variable map could be generated automatically would be ideal. Maybe there is a way to override the display method in snafu that I just haven't seen yet.

@shepmaster shepmaster added enhancement New feature or request help wanted Extra attention is needed labels Apr 29, 2021
@shepmaster
Copy link
Owner

See also projectfluent/fluent-rs#107

@kesmit13
Copy link
Author

Yep, that's almost exactly what I was thinking.

@shepmaster
Copy link
Owner

Closing as duplicate of #254

@kesmit13
Copy link
Author

kesmit13 commented May 3, 2021

So is there any way to currently use something other than a string literal as an error message?

@shepmaster
Copy link
Owner

There is not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants