Skip to content

New Context and Comment API

Compare
Choose a tag to compare
@veelo veelo released this 27 Aug 11:27
· 4 commits to main since this release

Previously, context and notes to the translator were supplied as an associate array literal:

tr!("Review the draft.", [Tr.context: "nautical",
                          Tr.note: `Nautical term! "Draft" = how deep the bottom` ~
                                   `of the ship is below the water level.`]);

Now, the preferred way is this:

tr!("Review the draft.", Context("nautical"),
                         Comment(`Nautical term! "Draft" = how deep the bottom` ~
                                 `of the ship is below the water level.`));

The previous form is still supported, but intentionally not documented.