Docs/readme - #16
Conversation
Add comprehensive localization framework section documenting the ResourceBundle-based translation system, supported languages table, and RTL support for Urdu and Persian. Update Docker image references from v1.0.2 to v1.0.4 and revise the multi-language UI list to reflect current language support.
Implement three-layer RTL handling for Urdu, Persian, Arabic, and Hebrew: - TranslationService sets dir="rtl" attribute on locale change - CSS overrides for sidebar, cards, forms, buttons, and animations - Toggle switches use logical properties (inset-inline-start/end) Add detailed RTL documentation to README including testing steps and automatic layout flipping behavior.
There was a problem hiding this comment.
Pull request overview
Adds application-wide right-to-left (RTL) support (Urdu/Persian) and expands localization to additional languages, updating both runtime behavior (dir switching + CSS) and documentation to reflect the new i18n/RTL architecture.
Changes:
- Set the document
dirattribute dynamically when locale changes and add anisRtlhelper. - Update Settings toggle switch styling to use logical inset properties for correct RTL/LTR positioning.
- Add RTL-specific CSS rules and expand README documentation for the localization/RTL framework (plus Docker image tag update).
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/main/java/com/clbooster/app/views/SettingsView.java | Uses logical CSS properties for toggle thumb positioning to support RTL. |
| src/main/java/com/clbooster/app/i18n/TranslationService.java | Sets <html dir> based on locale and introduces RTL detection helper. |
| src/main/frontend/themes/my-theme/styles.css | Adds RTL overrides for layout, navigation, animations, and font fallbacks. |
| README.md | Updates Docker image tag, supported languages list, and documents localization + RTL approach. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| TranslationService.java (implements I18NProvider) | ||
| - Resolves locale: session → user settings → default | ||
| - Loads ResourceBundle for the active locale | ||
| - Falls back to English if a key is missing |
There was a problem hiding this comment.
The README claims TranslationService “falls back to English if a key is missing”, but TranslationService.getTranslation() currently returns the key when a bundle exists but lacks the key (it only falls back to English when the entire bundle is missing). Either implement a per-key fallback to DEFAULT_LOCALE or adjust this documentation to match the actual behavior.
| - Falls back to English if a key is missing | |
| - Falls back to English if the locale bundle is missing; returns the key when no translation is defined |
| /* Flip margin/padding utilities */ | ||
| [dir="rtl"] [class*="margin-left"] { | ||
| margin-left: 0; | ||
| margin-right: auto; | ||
| } |
There was a problem hiding this comment.
The comment says “Flip margin/padding utilities”, but the rules below only address margin (no padding). Consider correcting the comment (or adding the corresponding padding flipping rules if that was intended) to avoid confusion for future maintenance.
This pull request introduces comprehensive support for right-to-left (RTL) languages (Urdu and Persian) across the application, updates the localization framework to support new languages, and improves documentation to reflect these changes. The update also includes visual and functional enhancements to ensure seamless RTL and multi-language user experiences.
Localization and RTL support improvements:
README.mdexplaining the localization framework, including architecture, supported languages, and how RTL support is implemented and tested.RTL UI and styling enhancements:
styles.cssto automatically flip layouts, alignments, navigation, animations, and font fallbacks for RTL languages.SettingsView.javato use logical CSS properties (inset-inline-start/end) for correct thumb positioning in both LTR and RTL layouts.Locale and direction handling in backend:
TranslationService.javato set the HTMLdirattribute dynamically based on the selected locale, and added anisRtlhelper to determine if the current language is RTL.Other updates:
README.mdto use the latest image tag (v1.0.4).