XAMPPRocky / fluent-templates

Easily add Fluent to your Rust project.
Apache License 2.0
137 stars 29 forks source link

Default lang argument in Tera templates #14

Closed technic closed 4 years ago

technic commented 4 years ago

this makes lang argument optional by providing global default value

See https://github.com/XAMPPRocky/fluent-templates/issues/13

@XAMPPRocky is it what you had in mind?

XAMPPRocky commented 4 years ago

Thank you for your PR! This looks great to me. Would you also be able to add a test that makes sure it works and a test that tera errors if you don't provide a lang parameter and don't have a default language?

technic commented 4 years ago

Great! I will add a test for it.

XAMPPRocky commented 4 years ago

Thank you for your PR, and congrats on your first contribution! 🎉

XAMPPRocky commented 4 years ago

This has now been published in 0.5.11