Skip to content

feat(i18n): right-to-left (RTL) language support in the editor#214

Open
JarbasAl wants to merge 1 commit into
devfrom
feat/rtl-support
Open

feat(i18n): right-to-left (RTL) language support in the editor#214
JarbasAl wants to merge 1 commit into
devfrom
feat/rtl-support

Conversation

@JarbasAl

Copy link
Copy Markdown
Member

Adds right-to-left support so languages like Persian (fa-IR, data already present) render and edit correctly.

One change, 4 files:

  • ovos_localize/lang_utils.pyis_rtl(code), single source of truth for direction, keyed on the BCP-47 primary subtag (never inferred from script, so Kabyle/Tifinagh stay LTR).
  • index.html — mirrored RTL_LANGS/isRtlLang(); translation textarea gets dir=rtl for RTL langs, JSON fields dir=auto; slot placeholders wrapped in <bdi> so Latin slot names don't scramble RTL text.
  • test/unittests/test_lang_utils.py — RTL/LTR table (incl. kab-is-LTR guard).
  • docs/local-development.md — RTL note + manual-QA caveat.

Local: full suite pytest test/ → 194 passed; node --check on the SPA script → OK; is_rtl/isRtlLang parity verified.

Bidi visual correctness (caret, punctuation order) isn't CI-verifiable — needs a manual fa-IR browser pass.

Add lang_utils.is_rtl() (keyed on the BCP-47 primary subtag) as the single
source of truth for writing direction, mirrored as isRtlLang() in the SPA.
The translation textarea gets dir=rtl for RTL languages, structured JSON
fields use dir=auto, and slot placeholders are wrapped in <bdi> so their
Latin names don't scramble surrounding RTL text. Direction is never inferred
from script, so Kabyle (Latin) and Tifinagh stay LTR.
@coderabbitai

coderabbitai Bot commented Jul 11, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@JarbasAl, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 59 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 415294f7-8896-4b6e-95ba-d36a297b61c2

📥 Commits

Reviewing files that changed from the base of the PR and between 5dc8e63 and 2cc29be.

📒 Files selected for processing (4)
  • docs/local-development.md
  • index.html
  • ovos_localize/lang_utils.py
  • test/unittests/test_lang_utils.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/rtl-support

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@JarbasAl JarbasAl marked this pull request as ready for review July 11, 2026 11:21
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