N
Novu15mo ago
SuPP

Custom handlebars helper

How to create custom handlebars helper?
10 Replies
SuPP
SuPPOP15mo ago
and where is the plural handlebars helper? from older version
Pawan Jain
Pawan Jain15mo ago
Hi @suppmkl You can use pluralize like this
{{pluralize dog_count "dog" "dogs"}}
{{pluralize dog_count "dog" "dogs"}}
We are doing POC on react-email for email editor In future release we are planning to replace handlebar helpers with some other alternative Currently, custom handlebar is not supported which handlebar helper you are looking to add?
SuPP
SuPPOP15mo ago
We would like to extend the current plural for the features of the Russian language
Novu_Bot
Novu_Bot15mo ago
@suppmkl, you just advanced to level 3!
SuPP
SuPPOP15mo ago
as in the i18n library something like - pluralize step.events "пользователь" "пользователя" "пользователей"
Pawan Jain
Pawan Jain15mo ago
You can use it like this.
{{pluralize step.events "пользователя" "пользователей"}}
{{pluralize step.events "пользователя" "пользователей"}}
Linear
Linear15mo ago
SuPP
SuPPOP15mo ago
1 пользователь 2 пользователя 5 пользователей these are the subtleties of the Russian language and that's why we wanted to manually write our helper, I hope you understand what I mean Mike and 1 user wrote you a message Mike and 2 user's wrote you a message Mike and 5 user's wrote you a message but in russian its 3 variants Майк и 1 пользователь написал вам сообщение Майк и 2 пользователя написали вам сообщение Майк и 5 пользователей написали вам сообщение
Pawan Jain
Pawan Jain15mo ago
We are working on multi language translations feature, I think that feature will help in this usecase
SuPP
SuPPOP15mo ago
okay, thank you very match
Want results from more Discord servers?
Add your server