Commit Graph

3 Commits

Author SHA1 Message Date
Hannah Wolfe
224c6996f1 Added new tests & missing return type to tpl
- Ensuring that various strings from en.json will work
- Added missing return type
2021-06-09 12:25:45 +01:00
Hannah Wolfe
1a0436b540 Added ts-ignore for lodash interpolate
- ts complains the value may be undefined but in reality it never is
- plus we don't care about this error in this context as the test is checking that the value is set to its default
2021-06-09 12:00:07 +01:00
Hannah Wolfe
6d3a629690 Added minimal tpl() template helper
- This mini helper wraps lodash template and supports `{...}` as the delimiters
- It's designed to use and support the exact same patterns we already have in our en.json strings
E.g. The {flagName} flag must be enabled in labs if you wish to use the \\{\\{{helperName}\\}\\} helper.
- This allows us to get rid of our old, broken i18n helper and still keep some of the smart messaging we have setup
- It also keeps the refactor surface area minimal
2021-06-09 10:04:49 +01:00