Locale-specific currency and date formatting
A localization owner runs this on pricing or event cards. The amount and the date are the same facts. The way they print is not. 1.299,00 € is easy to get wrong if someone types it into a text layer.
This happens whenever a pricing card or an event card has to ship in more than one locale. The formatted string should come from code, not from a person retyping separators.
The job is one PNG per locale, from a pricing card or an event card, with formatting done inside the component. You pass { locale, amount, isoDate }. You do not hand-type the formatted string.
Give Lerret a React component under .lerret/ and optional data. export writes a PNG. Same component, data swapped. There is no batch product, no queue, no orchestrator.
The component is .lerret/commerce/pricing.jsx or .lerret/social/event-promo.jsx. Formatting lives inside the component. Both cards format from { locale, amount, isoDate }. You pick the card you are actually shipping. You do not add a third format-specimen file unless you already have one.
The data is { locale, amount, isoDate } per locale file. The component does the formatting. One file per locale. Re-run export with a different --data file each time: bulk pattern 1. Same component, new values, new image. --data applies to the run and is never written back into .lerret/.
The image is a PNG per locale. One locale, one run, one file. The formatted string is not in the data.
Formatting logic lives in code once. Nobody hand-types 1.299,00 € into a text layer and gets the separator wrong. The locale field picks the format. The amount and the ISO date stay as data. The PNG shows what the component printed.
Point --data at one locale file holding { locale, amount, isoDate }. The component formats those fields. Re-run for the next locale file. --data is never written back into .lerret/. The PNG is what the component printed, not a string someone typed.
npx @lerret/cli@latest export --data
Start a project with npx create-lerret@latest. More in the use cases index.