Skip to content

Docs/readme - #16

Merged
Lion504 merged 3 commits into
mainfrom
docs/readme
Apr 1, 2026
Merged

Docs/readme#16
Lion504 merged 3 commits into
mainfrom
docs/readme

Conversation

@Lion504

@Lion504 Lion504 commented Apr 1, 2026

Copy link
Copy Markdown
Owner

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:

  • Expanded supported UI languages to include Chinese, Urdu, Persian, and Portuguese, and updated documentation to reflect these changes. [1] [2]
  • Added a new section to the README.md explaining the localization framework, including architecture, supported languages, and how RTL support is implemented and tested.

RTL UI and styling enhancements:

  • Added extensive RTL-specific CSS rules in styles.css to automatically flip layouts, alignments, navigation, animations, and font fallbacks for RTL languages.
  • Updated the language toggle switch in SettingsView.java to use logical CSS properties (inset-inline-start/end) for correct thumb positioning in both LTR and RTL layouts.

Locale and direction handling in backend:

  • Modified TranslationService.java to set the HTML dir attribute dynamically based on the selected locale, and added an isRtl helper to determine if the current language is RTL.

Other updates:

  • Updated Docker instructions in README.md to use the latest image tag (v1.0.4).

Lion504 added 2 commits April 1, 2026 13:26
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.
@Lion504
Lion504 marked this pull request as ready for review April 1, 2026 10:43
Copilot AI review requested due to automatic review settings April 1, 2026 10:43
@Lion504
Lion504 merged commit ebb65c5 into main Apr 1, 2026
1 check passed
@Lion504
Lion504 deleted the docs/readme branch April 1, 2026 10:47

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 dir attribute dynamically when locale changes and add an isRtl helper.
  • 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.

Comment thread README.md
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

Copilot AI Apr 1, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
- 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

Copilot uses AI. Check for mistakes.
Comment on lines +720 to +724
/* Flip margin/padding utilities */
[dir="rtl"] [class*="margin-left"] {
margin-left: 0;
margin-right: auto;
}

Copilot AI Apr 1, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
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.

2 participants