Skip to content

feat(app): extract the agent slice into i18n, en+ru (CLEAN-38) - #33

Merged
maksymhryzodub-prog merged 1 commit into
feat/CLEAN-37-i18n-user-slicefrom
feat/CLEAN-38-i18n-agent-slice
Aug 19, 2026
Merged

feat(app): extract the agent slice into i18n, en+ru (CLEAN-38)#33
maksymhryzodub-prog merged 1 commit into
feat/CLEAN-37-i18n-user-slicefrom
feat/CLEAN-38-i18n-agent-slice

Conversation

@maksymhryzodub-prog

Copy link
Copy Markdown
Contributor

Implements CLEAN-38 (subtask of CLEAN-33): https://dreamvention.atlassian.net/browse/CLEAN-38

Third in the stackmain#30#31this. Targets feat/CLEAN-37-i18n-user-slice; nothing merges until the chain is complete.

Moves all copy out of the agent list, card, detail item and chat screen: the 28 strings the scan found, plus the ones it could not see — status labels and relative timestamps assembled in script.

Keys, not text

  • Status meta returns status.running instead of "Running", keeping the raw value for the default branch: if the runtime reports a status we have no wording for, it still shows verbatim rather than a key path.
  • Restart overlay returns titleKey / bodyKey per stage ("Stopping current pod…" → "Deploying new pod…" → …).
  • Relative timestamps return a bucket plus its number ({key: 'relative_time.minutes', count: 5}), so the unit and word order live in the locale file — "5m ago" becomes "5 мин назад" without touching the component.
  • agentChat drops its hardcoded 'Restart failed' the same way the auth providers did: a failure flag plus whatever the server actually said.

The running counter keeps the number's emphasis through an <i18n-t> slot rather than splitting the sentence into fragments around the markup.

Two infrastructure bits this slice forced

Russian plural rules. The free-slots counter is a genuine plural, and Russian needs three forms where English has two — vue-i18n's default rule would pick the wrong branch for most numbers. Added pluralRules.ru to the shared i18n config, taught the translator prompt the branch order, and ru came back correct:

нет свободных слотов | {count} слот свободен | {count} слота свободно | {count} слотов свободно

Narrowed the message guard I added yesterday. It rejected a bare | alongside @ — but | is the plural separator, a feature we now use, not a mistake. It flags only @ outside the intentional @:key linked form.

Verification

  • nuxt typecheck and nuxt build clean; ru strings present in the built client chunks.
  • i18n:check green across 5 slice/locale pairs.
  • Re-scan finds nothing hardcoded left in the slice. Remaining across app: chat (15) and template (4) — CLEAN-39 and CLEAN-40.

🤖 Generated with Claude Code

Moves all copy out of the agent list, card, detail item and chat screen
— 28 strings the scan found plus the ones it could not see: status
labels and relative timestamps built in script.

Keys, not text, wherever script decides the wording: status meta returns
`status.running` (with the raw value kept for a status the runtime
invented and we have no wording for), the restart overlay returns
titleKey/bodyKey per stage, and the relative timestamp returns a bucket
plus its number so "5m ago" can be reordered by the translation.
agentChat drops its hardcoded 'Restart failed' the same way the auth
providers did — a failure flag plus the server's own message.

Two infrastructure bits this slice forced:

- Russian plural rules in the i18n config. The free-slots counter is a
  real plural, and Russian needs three forms where English has two, so
  vue-i18n's default rule would pick the wrong branch for most numbers.
  The translator prompt now states the branch order, and ru came back
  with the correct four ("нет свободных слотов | {count} слот свободен |
  {count} слота свободно | {count} слотов свободно").
- Narrowed yesterday's message guard. It rejected a bare `|` as well as
  `@`, but `|` *is* the plural separator — a legitimate feature, not a
  mistake. It now flags only `@` outside the `@:key` linked form.

Verified: nuxt typecheck and nuxt build clean, ru strings in the client
chunks, i18n:check green over 5 slice/locale pairs, and a re-scan finds
nothing hardcoded left in the slice.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@maksymhryzodub-prog
maksymhryzodub-prog force-pushed the feat/CLEAN-38-i18n-agent-slice branch from d2d73f0 to 1aeb4db Compare August 19, 2026 21:07
@maksymhryzodub-prog
maksymhryzodub-prog merged commit feaf760 into main Aug 19, 2026
1 check passed
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.

1 participant