harn-stdlib 0.10.197

Embedded Harn standard library source catalog
Documentation
/** Generated by scripts/generate_cli_localization.mjs. Do not edit. */
import { MESSAGE_243 } from "std/cli/localization/messages/part_48"
import { MESSAGE_298 } from "std/cli/localization/messages/part_59"
import { MESSAGE_313 } from "std/cli/localization/messages/part_62"
import { MESSAGE_320, MESSAGE_321 } from "std/cli/localization/messages/part_64"
import { MessageTemplate, render_message } from "std/cli/message_template"

const MESSAGES: dict<string, MessageTemplate> = {
  "local provider recommendations\n": MESSAGE_243,
  "{0}   caveat: {1}\n": MESSAGE_298,
  "{0}(no local model outcomes found)\n": MESSAGE_313,
  "{0}source: {1}\n": MESSAGE_320,
  "{0}{1}. {2} {3} ({4}, selector {5}, tools {6})\n": MESSAGE_321,
}

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