harn-stdlib 0.10.195

Embedded Harn standard library source catalog
Documentation
/** Generated by scripts/generate_cli_localization.mjs. Do not edit. */
import { MESSAGE_241 } from "std/cli/localization/messages/part_48"
import { MESSAGE_299 } from "std/cli/localization/messages/part_59"
import { MessageTemplate, render_message } from "std/cli/message_template"

const MESSAGES: dict<string, MessageTemplate> = {
  "loaded:\n": MESSAGE_241,
  "{0}  - {1} (size={2} vram={3} ctx={4} expires={5})\n": MESSAGE_299,
}

/**
 * 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)
}