Skip to content

feat(i18n): Arabic + Hebrew RTL Beta — full UI translation, Noto fonts, RTL layout (C-6)#71

Merged
qnbs merged 4 commits into
mainfrom
feat/rtl-i18n-ar-he-beta
Jun 3, 2026
Merged

feat(i18n): Arabic + Hebrew RTL Beta — full UI translation, Noto fonts, RTL layout (C-6)#71
qnbs merged 4 commits into
mainfrom
feat/rtl-i18n-ar-he-beta

Conversation

@qnbs

@qnbs qnbs commented Jun 3, 2026

Copy link
Copy Markdown
Owner

User description

Summary

Ships Arabic (ar) and Hebrew (he) as a production-near Beta. All 18 UI-chrome modules are fully translated for both locales; help.json long-form prose stays English fallback (community follow-up). "(Beta)" labels retained in every language picker.

i18n

  • Translate ar + he across all 18 modules (common, settings, templates, writer, manuscript, characters, worlds, export, dashboard, outline, lora, sidebar, tags, portal, tour, mindmap, objects, characterInterviews). Placeholders + product names preserved per SKIP_PATTERNS.
  • check-i18n-keys.mjs now validates ar/he parity: 2236 keys × 7 locales.
  • Rebuild public/locales/{ar,he}/bundle.json.
  • i18nBootstrap cold-start values for ar/he translated to match bundles (no English flash on first paint); tests updated.
  • docs/I18N-GLOSSARY-RTL.md added as the binding ar/he term glossary.

Fonts

  • Add @fontsource/noto-sans-arabic, -hebrew, -naskh-arabic; import weights in index.tsx.
  • New --font-ui-rtl / --font-editor-rtl tokens swapped under [dir="rtl"]; ManuscriptEditor prefers Naskh for RTL prose.

RTL layout

  • Global [dir="rtl"] CSS net: text-align/float flips, .rtl-auto-mirror, .rtl-keep-ltr.
  • Logical-property conversion in shell: Sidebar, Modal, CommandPalette, Toast.
  • Canvas/SVG islands (PlotCanvas, CharacterGraphView) pinned LTR so pointer/getBoundingClientRect geometry stays correct while chrome flips.
  • WelcomePortal offers ar/he (ع / א) from first launch.

Verification

  • lint ✅ (1097 files, 0 warnings) · typecheck ✅ · i18n:check ✅ (2236 × 7) · build + smoke:prod ✅ (PASS — production build mounts, no pageerror).
  • Tests: i18nBootstrap + rtlFoundation → 18/18 pass.

Docs

  • AUDIT.md, TODO.md (C-6 → 🔄), README.md (badge, locale list, RTL section, metrics) updated. Graphs refreshed.

Remaining (community follow-up)

  • Native-speaker review of ar/he translations.
  • help.json long-form prose translation (currently English fallback).

🤖 Generated with Claude Code


CodeAnt-AI Description

Add Arabic and Hebrew RTL beta support with translated startup text

What Changed

  • Added Arabic and Hebrew to the first-launch language picker and translated the app’s startup text so these languages no longer fall back to English on open
  • Expanded Arabic and Hebrew interface text across settings, help, and core views so more of the app is usable in both RTL languages
  • Switched key navigation, dialog, toast, and command palette spacing to read correctly in right-to-left layouts
  • Kept the scene board and character graph laid out left-to-right so drawing, panning, and graph interaction stay accurate in RTL mode
  • Added Arabic and Hebrew font support so mixed Arabic/Hebrew text renders with matching glyphs instead of broken fallback fonts

Impact

✅ Clearer first launch in Arabic and Hebrew
✅ Fewer broken RTL layouts
✅ Correct scene board and graph interaction in RTL

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

…s, RTL layout (C-6)

Ships ar/he as a production-near Beta. All 18 UI-chrome modules are fully
translated for both locales; help.json long-form prose stays English fallback
(community follow-up). "(Beta)" labels retained in every language picker.

i18n
- Translate ar + he across common, settings, templates, writer, manuscript,
  characters, worlds, export, dashboard, outline, lora, sidebar, tags, portal,
  tour, mindmap, objects, characterInterviews (placeholders + product names
  preserved per SKIP_PATTERNS).
- check-i18n-keys.mjs now validates ar/he parity: 2236 keys × 7 locales.
- Rebuild public/locales/{ar,he}/bundle.json.
- i18nBootstrap cold-start values for ar/he translated to match bundles
  (no English flash on first paint); tests updated.
- docs/I18N-GLOSSARY-RTL.md added as the binding ar/he term glossary.

Fonts
- Add @fontsource/noto-sans-arabic, -hebrew, -naskh-arabic; import weights in
  index.tsx. New --font-ui-rtl / --font-editor-rtl tokens swapped under
  [dir="rtl"]; ManuscriptEditor prefers Naskh for RTL prose.

RTL layout
- Global [dir="rtl"] CSS net: text-align/float flips, .rtl-auto-mirror,
  .rtl-keep-ltr.
- Logical-property conversion in shell: Sidebar, Modal, CommandPalette, Toast.
- Canvas/SVG islands (PlotCanvas, CharacterGraphView) pinned LTR so
  pointer/getBoundingClientRect geometry stays correct while chrome flips.
- WelcomePortal offers ar/he (ع / א) from first launch.

Verification: lint ✅ · typecheck ✅ · i18n:check ✅ (2236×7) · build + smoke:prod ✅.
Docs: AUDIT.md, TODO.md (C-6 → 🔄), README.md updated. Graphs refreshed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@codeant-ai

codeant-ai Bot commented Jun 3, 2026

Copy link
Copy Markdown

CodeAnt AI is reviewing your PR.


Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@vercel

vercel Bot commented Jun 3, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
storycraft-studio Ready Ready Preview, Comment Jun 3, 2026 12:51pm

@codeant-ai codeant-ai Bot added the size:XXL This PR changes 1000+ lines, ignoring generated files label Jun 3, 2026
Comment thread components/scene-board/PlotCanvas.tsx
Comment thread index.css Outdated
Comment thread components/WelcomePortal.tsx Outdated
Comment thread components/manuscript/ManuscriptEditor.tsx Outdated
@codeant-ai

codeant-ai Bot commented Jun 3, 2026

Copy link
Copy Markdown

CodeAnt AI finished reviewing your PR.

qnbs and others added 3 commits June 3, 2026 10:54
…or font map, WelcomePortal Beta

Resolves all 4 CodeAnt AI review comments on PR #71:

- index.css: break circular CSS var. `--font-ui-rtl`/`--font-editor-rtl` no longer
  reference var(--font-ui)/var(--font-editor) (which [dir="rtl"] reassigns to the -rtl
  tokens → cycle → font-family dropped to browser default). Base stacks now inlined
  literally, so the Noto/Inter stack survives at computed-value time under RTL.
- PlotCanvas: the board wrapper stays .rtl-keep-ltr for pointer geometry, but card
  title/summary now use dir="auto" so Arabic/Hebrew scene text reads RTL/BiDi correctly
  instead of inheriting forced LTR.
- ManuscriptEditor: map editorFont enum → concrete CSS stack (EDITOR_FONT_STACKS, mirrors
  Textarea fontMap). Non-RTL no longer emits the raw enum ('custom' is not a valid
  font-family); highlight overlay + textarea render identical stacks.
- WelcomePortal: ar/he buttons now carry the "(Beta)" qualifier via title + aria-label
  and a visible β marker, matching the Settings/Command-Palette pickers.

Verified: lint ✅ · typecheck ✅ · build ✅ · smoke:prod ✅.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…te Settings Guide (C-6)

Help Center: new "Advanced & Power Features" category in helpCatalog.ts with
8 articles — Languages/RTL, LoRA fine-tuning, ProForge, Voice control,
At-rest encryption, Cloud Sync, Plugins, Adaptive AI/GPU/Eco — translated in
en/de/fr/es/it (ar/he English fallback for the RTL Beta). Offline help-RAG
(helpDocRetrieval.ts) grown 13 → 16 chunks: languages-rtl, privacy-local-ai,
advanced-editing.

Settings Guide: SettingsGuideSection now documents every live settings
category. The previously-undocumented Fine-Tuning (LoRA), Community, and
Plugins categories now appear with title/desc + search hints in all 7 locales.

i18n: +23 help keys, +6 settings keys → 2259 keys × 7 locales at parity.
Tests: strengthened SettingsGuideSection (regression guard for the 3 added
categories) + helpDocRetrieval (3 new-chunk retrieval guards). Docs:
AUDIT.md / TODO.md / README.md updated.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​fontsource/​noto-naskh-arabic@​5.2.1176100849290
Added@​fontsource/​noto-sans-hebrew@​5.2.877100848690
Added@​fontsource/​noto-sans-arabic@​5.2.1078100858690

View full report

@qnbs
qnbs merged commit 274b9fc into main Jun 3, 2026
16 checks passed
@qnbs
qnbs deleted the feat/rtl-i18n-ar-he-beta branch June 3, 2026 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL This PR changes 1000+ lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant