uicopy

package
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 17, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package uicopy is the single source of every user-facing string ovdb's CLI, TUI and web console show. It embeds copy/en.json so a Go binary needs no separate copy file at runtime, and the Vite build in web/ imports the same en.json directly, so both surfaces render one catalogue.

See spec/features/configuration-parity#REQ:copy-catalogue.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func T

func T(key string, params map[string]string) string

T renders the copy catalogue entry named by key, replacing each "{name}" placeholder in the template with params[name]. A placeholder with no matching entry in params is left in place, and every extra entry in params is ignored, so callers may pass a shared params map.

T panics when key is absent from copy/en.json. Every call site passes a string literal, so a missing key is a build-time defect: copy_ast_test.go walks the module for every "uicopy.T(\"...\")" literal and fails the build naming the missing key, so this panic should never fire outside that test demonstrating the failure.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL