Skip to content

[POC] Extract all user-facing strings into a file#1673

Draft
vcheung-stripe wants to merge 1 commit into
masterfrom
vcheung-text-file
Draft

[POC] Extract all user-facing strings into a file#1673
vcheung-stripe wants to merge 1 commit into
masterfrom
vcheung-text-file

Conversation

@vcheung-stripe

Copy link
Copy Markdown
Collaborator

Proof of concept for defining all user-facing strings in a file so that:

  • Strings are more easily reviewable by non-eng
  • We can eventually localize messages, if this is something we want to do

Introduces pkg/i18n with en_us.yaml as the single source of user-facing
strings. T("key") returns a plain string; Tf("key", Args{"name": val})
returns a string with {name} placeholders replaced. The Args map type
makes placeholder names explicit at the call site.

Refactors all user-facing strings across pkg/cmd, pkg/login, pkg/proxy,
and pkg/requests to use the new system.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Committed-By-Agent: claude
Comment thread pkg/cmd/sandbox.go
fmt.Printf("You already have an active sandbox.\n\n")
fmt.Printf("Secret key: %s\n", existingKey)
fmt.Print(i18n.T("sandbox.create.output.active_sandbox_header"))
fmt.Print(i18n.Tf("sandbox.create.output.active_sandbox_secret_key", i18n.Args{"key": existingKey}))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants