core icon indicating copy to clipboard operation
core copied to clipboard

Accept arrays of keys and interpolateParams

Open aaptl opened this issue 3 years ago • 0 comments

Current behavior

Can't send array of keys with same params and supply different values specific to a key eg:- "maxOfCharacter": "Max of {{length}} Characters", "charactersLeft": "{{length}} Characters Left",

Expected behavior

send array of keys with corresponding params get translated stream of values

What is the motivation / use case for changing the behavior?

if we want to translate an array of keys with same params name but want to supply different value for each key

How do you think that we should implement this?

"maxOfCharacter": "Max of {{length}} Characters", "charactersLeft": "{{length}} Characters Left",

there can be mutiple ways to do it get(['charactersLeft','maxOfCharacter'], {'charactersLeft':{ length: charLeft },maxOfCharacter:{ length: charLeft }}) or get([{'charactersLeft', { length: charLeft }}, {'maxChars', { length: charLeft }})

aaptl avatar Sep 24 '21 12:09 aaptl