Export translation message IDs for shared presentation

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Storm DragonandClaude Opus 5.5 committed 2026-11-15 14:41:02 -05:00
1 parent 03896de84e
commit 8a61bfff04
11 files changed
+335 -19

No files matched your search

+4
View File
@@ -12,6 +12,10 @@ import (
// calling context; a nil function selects the built-in English messages.
type Messages struct{ Translate func(string) string }
// Mark returns id unchanged. It flags a message ID that is chosen before
// translation, such as a template held in a variable, for catalog extraction.
func Mark(id string) string { return id }
func (m Messages) T(message string) string {
if m.Translate != nil {
return m.Translate(message)