Skip to content

fix(i18n): say the spawn list TTL column is time remaining (#54) - #55

Merged
scttfrdmn merged 1 commit into
mainfrom
fix/54
Oct 15, 2026
Merged

scttfrdmn merged 1 commit into
mainfrom
fix/54

Conversation

@scttfrdmn

Copy link
Copy Markdown
Contributor

Fixes #54

spore-host/spawn#900 changes the spawn list TTL column from the configured TTL (1h) to the time left before the termination deadline (53m, none, expired). The header still said TTL, which now reads as the configured value.

spawn.list.header.ttl in all six locales:

locale before after
en TTL TTL Left
de TTL Rest-TTL
es TTL TTL restante
fr TTL TTL restant
pt TTL TTL Restante
ja TTL 残りTTL

The issue suggested TTL LEFT. The neighbouring spawn list headers are title case in English (Instance ID, Public IP, IAM Role), so English uses TTL Left. Each other locale follows its own casing: title case in pt, sentence case in es/fr, the compound form in de. The message ID is unchanged, so callers need no code change. The en description now says the column is time remaining.

Consumers checked

  • spawn.list.header.ttl is used only by spawn/cmd/list.go.
  • No test or golden file in the sibling repos matches the spawn list header text. The "TTL" matches in spawn's e2e tests are on spored status output, not spawn list.
  • Column width: spawn list uses text/tabwriter with minwidth 0, padding 2 (newTableWriter in cmd/utils.go), so columns size to their widest cell and the longer header needs no other change.

Tests

  • go vet ./... and go test ./... pass.
  • A throwaway test, not committed, loaded each locale through NewLocalizer and printed T("spawn.list.header.ttl"). All six returned the new strings.

Follow-up

spawn needs a libs bump after this is released for the header to change (spore-host/spawn#900).

spawn list now shows the time left before the termination deadline in
the TTL column (spore-host/spawn#900), so a bare "TTL" header reads as
the configured TTL. spawn.list.header.ttl becomes "TTL Left" (en),
"Rest-TTL" (de), "TTL restante" (es), "TTL restant" (fr),
"TTL Restante" (pt) and "残りTTL" (ja), following each locale's
existing header casing. Message ID unchanged.

Fixes #54
@codecov

codecov Bot commented Oct 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@scttfrdmn
scttfrdmn merged commit 39796d2 into main Oct 15, 2026
6 checks passed
@scttfrdmn
scttfrdmn deleted the fix/54 branch October 15, 2026 18:22
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.

i18n: rename spawn list TTL header to 'TTL LEFT' (column now shows time remaining)

1 participant