howdy/i18n/cli
The gleam run -m howdy/i18n/cli command line.
genchecks the catalogues and writes a Gleam module with a function for each message, by defaultsrc/<app>/messages.gleam.checkreports problems without writing anything, and fails when there are errors, for CI.add <locale>starts a catalogue for another locale, as a copy of the source catalogue marked for review, for translators to work through.
Options:
--locales=<dir>: where the catalogues are, by defaultlocales. Each is a JSON file named by its locale, such asde.json; seehowdy/i18nfor what goes in them.--out=<file>: the modulegenwrites.--source=<locale>: the locale messages are written in first, by defaulten. Its catalogue decides which messages exist and what arguments they take; the others translate it, and any message they lack falls back to it.--standalone: generate a module that depends only on the standard library, taking the catalogue’s locale as a string instead of a translator. For libraries that offer translations without depending on this package.
Errors are messages that cannot be generated, such as invalid ICU
syntax or an argument the source message lacks. Warnings, such as a
missing message or plural form, fall back and do not stop gen.
Values
pub fn execute(args: List(String)) -> Result(String, String)
Run a command, returning what to print, or what went wrong.