muraleedharan You're right, I think I see the issue. The text keys you're referencing I think are used by some of our JavaScript based components, and use a different format that isn't compatible with the Freemarker text.format context object.
The text keys compatible with text.format have a slightly different syntax. For example:
message.message-view.kudos-count.label = {0} {0,choice,0#Kudos|1#Kudo|1<Kudos}
I created a test component like this:
${text.format("message.message-view.kudos-count.label",123)}
And the output was:
123 Kudos
So what you could do instead is to create a couple of custom text keys like:
custom.li.nodes.NodeCreationDate.date = Created {0}
custom.li.memberships.MembershipCount.count = {0} {0,choice,0#members|1#member|1<members}
And then in your custom component, you'd have:
<#-- Could be from API result or other source -->
<#assign myDate = "10/22/21" />
<#assign myMembershipCount = 123 />
${text.format("custom.li.nodes.NodeCreationDate.date",myDate)}<br/>
${text.format("custom.li.memberships.MembershipCount.count",myMembershipCount)}
And this would render:
Created 10/22/21
123 members
I hope this helps!