feat(i18n): right-to-left (RTL) language support in the editor#214
feat(i18n): right-to-left (RTL) language support in the editor#214JarbasAl wants to merge 1 commit into
Conversation
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.
|
Warning Review limit reached
Next review available in: 59 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the 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 configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
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.py—is_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— mirroredRTL_LANGS/isRtlLang(); translation textarea getsdir=rtlfor RTL langs, JSON fieldsdir=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 --checkon the SPA script → OK;is_rtl/isRtlLangparity verified.Bidi visual correctness (caret, punctuation order) isn't CI-verifiable — needs a manual
fa-IRbrowser pass.