RuneStone 1.0.0

This commit is contained in:
Knotty Wyvern
2026-11-16 04:21:21 -07:00
commit b52eeb14a1
827 changed files with 241421 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
// The user-visible text of the storage code and the domain code. These folders use no host module, so the skill helper
// can bundle them for Node. `message()` marks a key of the host catalog (`src/lib/i18n/messages.ts`), and the catalog
// audit counts it. The text stays English here. The interface translates it with `localize()` (`../ui/text.ts`).
/** Mark a catalog key. It returns the text unchanged. */
export function message<T extends string>(text: T): T {
return text;
}
/** Put the values into the `{name}` placeholders of a catalog key. */
export function format(template: string, values: Record<string, string | number>): string {
return template.replace(/\{(\w+)\}/g, (match, key: string) => Object.hasOwn(values, key) ? String(values[key]) : match);
}