Register functions in translation

This commit is contained in:
Jonathan Brouwer 2026-02-04 17:17:45 +01:00
parent 66daca1a85
commit 6782a190f2
No known key found for this signature in database
GPG key ID: F13E55D38C971DEF
2 changed files with 3 additions and 2 deletions

View file

@ -192,7 +192,7 @@ pub fn fluent_bundle(
Ok(Some(bundle))
}
fn register_functions(bundle: &mut FluentBundle) {
pub fn register_functions<R, M>(bundle: &mut fluent_bundle::bundle::FluentBundle<R, M>) {
bundle
.add_function("STREQ", |positional, _named| match positional {
[FluentValue::String(a), FluentValue::String(b)] => format!("{}", (a == b)).into(),