( key: string, defaultString: string, demoParams?: Record<string, unknown> )
| 198 | } |
| 199 | |
| 200 | export default function t( |
| 201 | key: string, |
| 202 | defaultString: string, |
| 203 | demoParams?: Record<string, unknown> |
| 204 | ) { |
| 205 | const { fragments, text, messageExpression } = renderTranslatedText( |
| 206 | key, |
| 207 | defaultString, |
| 208 | demoParams |
| 209 | ); |
| 210 | |
| 211 | return [ |
| 212 | ...fragments, |
| 213 | React.createElement( |
| 214 | 'span', |
| 215 | { key: 'render-el', 'th:utext': messageExpression }, |
| 216 | addBrToTranslations(text) |
| 217 | ), |
| 218 | ]; |
| 219 | } |
| 220 | |
| 221 | t.raw = function ( |
| 222 | key: string, |
no test coverage detected