Skip to content

feat(ui): multi-language support with per-page translation tabs#10

Merged
maloun96 merged 3 commits intomainfrom
feat/i18n-support
Mar 25, 2026
Merged

feat(ui): multi-language support with per-page translation tabs#10
maloun96 merged 3 commits intomainfrom
feat/i18n-support

Conversation

@maloun96
Copy link
Copy Markdown
Collaborator

Summary

  • Suffix-based i18n: billing.md (default), billing.he.md, billing.ro.md
  • Language tabs in editor to switch/create translations per page
  • Sidebar shows only default-lang pages — clean, no clutter
  • Save button writes locally, Publish button in navbar creates single batch PR
  • New endpoints: /api/translations, /api/languages, /api/changes, /api/publish
  • Languages configurable via aidocs-config.yml

Test plan

  • Configure languages in aidocs-config.yml (e.g. en,he,ro)
  • Verify sidebar only shows default-lang pages
  • Click a page, verify language tabs appear (EN | HE | RO)
  • Click HE+ tab, verify empty editor opens for new translation
  • Save a translation, verify file created with suffix (e.g. billing.he.md)
  • Reopen page, verify HE tab now loads saved content
  • Test Publish button creates PR with all local changes
  • Test without languages configured — no tabs shown

🤖 Generated with Claude Code

maloun96 and others added 3 commits March 25, 2026 10:19
- Suffix-based i18n: billing.md (default), billing.he.md, billing.ro.md
- Language tabs in editor header to switch/create translations
- Sidebar shows only default-lang pages, translations accessed via tabs
- Save writes locally, Publish button creates batch PR with all changes
- /api/translations, /api/languages, /api/changes, /api/publish endpoints
- Config: languages list in aidocs-config.yml

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Auto-detect RTL languages (he, ar, fa, ur, yi)
- Set dir=rtl on textarea + preview pane when editing RTL lang
- Auto-add direction:rtl to frontmatter on save
- /api/languages returns rtl list, /api/translations includes rtl flag

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Update endpoint returns JSON instead of redirect
- AJAX save keeps editor open with current page selected
- Button shows "Saving..." → "Saved" → disabled until next edit

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@maloun96 maloun96 merged commit 19f4cbf into main Mar 25, 2026
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