-
Hello!
I want to substitute the variable status_pin instead of "true" so that the value is determined dynamically. I tried this: or
or None of this works. How to do it right? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I passed the variable directly and used it in the message like this: brand-status =
{ $status_pin ->
[true] ✅
*[false] ✔️
}
edit_post-pin_btn = { brand-status } Закрепить |
Beta Was this translation helpful? Give feedback.
-
This is by design, see #230 (might be good to add some more details about your use case to that ticket). You can use a message reference instead of a term reference or duplicate the switch logic, see @m-xim's response. Alternatively, you could inject a function |
Beta Was this translation helpful? Give feedback.
I passed the variable directly and used it in the message like this:
Playground:
https://projectfluent.org/play/?s=eyJtZXNzYWdlcyI6IlxuYnJhbmQtc3RhdHVzID1cbiAgICB7ICRzdGF0dXNfcGluIC0-XG4gICAgICAgIFt0cnVlXSDinIVcbiAgICAgICAqW2ZhbHNlXSDinJTvuI9cbiAgICB9XG5cblxuZWRpdF9wb3N0LXBpbl9idG4gPSB7IGJyYW5kLXN0YXR1cyB9INCX0LDQutGA0LXQv9C40YLRjFxuIiwidmFyaWFibGVzIjp7InN0YXR1c19waW4iOiJ0cnVlIn0sInNldHVwIjp7InZpc2libGUiOlsibWVzc2FnZXMiLCJvdXRwdXQiLCJjb25maWciXSwibG9jYWxlIjoiZW4tVVMiLCJkaXIiOiJsdHIifX0