-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Labels
Description
Extend strong-globalize to support template literals via tagged template literals.
Sample usage:
const {_} = require('strong-globalize')();
const name = 'world';
console.log(_`Hello ${name}`);
Preliminary list of tasks:
- When gathering strings to potentially localize, look for template literals and convert them into messages with indexed placeholders. In the example above, the following
messages
entry should be created:Hello {0}
- Implement
_
as a tag function applying localization under the hood.