-
Notifications
You must be signed in to change notification settings - Fork 662
Feat/rtl indic script support(#1259) #1326
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Feat/rtl indic script support(#1259) #1326
Conversation
- Add Nepali translation in readme/ne.md - Update i18n.json to include 'ne' in target languages
- Add Odia translation in readme/or.md - Update i18n.json to include 'or' in target languages
- Add Marathi translation in readme/mr.md - Update i18n.json to include 'mr' in target languages Closes lingodotdev#1256
- Add Sinhala translation in readme/si.md - Update i18n.json to include 'si' in target languages - Use proper Sinhala script and terminology
- Add i18n-scripts.json configuration for script and direction metadata - Add scriptConfig utility functions for handling RTL and script-specific styling - Add React hook (useScriptStyle) for easy integration - Add LocalizedText and LocalizedContent components - Support for RTL languages (Arabic, Hebrew, Persian) - Support for Indic scripts (Devanagari, Bengali, Sinhala) - Add proper font family configurations
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds comprehensive support for Right-to-Left (RTL) languages and Indic scripts to the Lingo.dev SDK, addressing issue #1259. The implementation includes a configuration system, utility functions, React hooks, and components for proper rendering of different scripts.
Key changes:
- Script configuration system with direction, script family, and font family metadata
- Utility functions and React hooks for automatic script detection and style application
- New React components for rendering localized text and HTML content
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| config/i18n-scripts.json | Defines script configurations (direction, font families) for RTL and Indic languages |
| i18n.json | Extends target locale entries with script and direction metadata |
| packages/sdk/src/utils/scriptConfig.ts | Utility functions for loading and applying script configurations |
| packages/sdk/src/hooks/useScriptStyle.ts | React hooks for script style detection and application |
| packages/sdk/src/components/LocalizedText.tsx | React components for rendering localized content with proper script styling |
| readme/si.md | Sinhala translation of the README |
| readme/or.md | Oriya/Odia translation of the README |
| readme/ne.md | Nepali translation of the README |
| readme/mr.md | Marathi translation of the README |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Hey @Jayant-1 please go through the comments and resolve the merge conflicts. Also ensure that you've read and are following the guidelines laid out in our contributor's guide. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix: MD file.
|
Hey @Jayant-1! Just checking in - are you still working on this PR? We noticed there are some comments that may need addressing. If you need more time, no problem! Just let us know. If we don't hear back within a week, we'll close this to keep the repo tidy, but you can always reopen when ready. |
|
Thanks for the reminder! Yes, I’m still working on this PR. |
Add RTL and Indic Script Support
fixes #1259
This PR adds comprehensive support for Right-to-Left (RTL) languages and proper rendering of Indic scripts in the Lingo.dev SDK.
Features
1. Script Configuration System
i18n-scripts.jsonwith metadata for:2. Utility Functions (
scriptConfig.ts)3. React Integration
useScriptStylehook for easy React integration4. New Components
LocalizedText: For rendering text with proper script stylingLocalizedContent: For rendering HTML content with script support