harn-stdlib 0.10.201

Embedded Harn standard library source catalog
Documentation
/** Generated by make gen-cli-localization. Do not edit. */
import { MESSAGE_228, MESSAGE_229 } from "std/cli/localization/messages/part_45"
import { MessageTemplate, render_message } from "std/cli/message_template"

const MESSAGES: dict<string, MessageTemplate> = {
  "error: --columns cannot be combined with --json; JSON always returns complete catalog rows":
    MESSAGE_228,
  "error: {0}": MESSAGE_229,
}

/**
 * Select a registered CLI template without interpreting argument text.
 * @effects: []
 * @errors: ["Unregistered CLI localization message", "CLI localization argument count does not match its registered template"]
 */
pub fn cli_message(locale: string, source: string, values: list<string>) -> string {
  const template = MESSAGES[source]
  guard template != nil else {
    throw "Unregistered CLI localization message"
  }
  return render_message(template, locale, values)
}