Replaces each {key} in str with replacers[key], and unescapes \{/\}. An unknown key is
replaced by the key text itself, and empty braces {} drop out leaving the surrounding text.
Adjacent strings are concatenated into one array entry, so a replacer that is not a string stays
its own entry — which is how a React element survives being substituted into a localized
template.
Replaces each
{key}instrwithreplacers[key], and unescapes\{/\}. An unknown key is replaced by the key text itself, and empty braces{}drop out leaving the surrounding text. Adjacent strings are concatenated into one array entry, so a replacer that is not a string stays its own entry — which is how a React element survives being substituted into a localized template.