Skip to content
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

feat: RTL Support for RTL Languages (Hebrew, Arabic) #2832

Conversation

michael-genson
Copy link
Collaborator

@michael-genson michael-genson commented Dec 12, 2023

What type of PR is this?

(REQUIRED)

  • feature

What this PR does / why we need it:

(REQUIRED)

Some languages (such as Hebrew) are read right to left. This has a bunch of formatting considerations as well (text should be right aligned, etc.). Currently, while we have translations for these languages, we don't change the formatting.

Thankfully, Vuetify supports this pretty simply with a rtl boolean property (which is False by default). This PR adds some metadata to our locales to include the text direction (and sets rtl to true if the direction is rtl). I've also updated the codegen to preserve this.

Which issue(s) this PR fixes:

(REQUIRED)

Fixes #2452
Tentatively fixes #2469, I'll close this with a note to re-open if not fixed

Special notes for your reviewer:

(fill-in or delete this section)

@hay-kot, if possible, can you confirm the codegen works? I can't really test it without the Crowdin API Key. I'm pretty confident it works, though.

Interestingly, it reverses a lot of the layout too (which I guess makes sense for RTL readers). This breaks a few things, but nothing major. We'll want to iron some of these out at some point.

image

Testing

(fill-in or delete this section)

Poked around the frontend switching between LTR and RTL langs.

@michael-genson
Copy link
Collaborator Author

If any of our supported languages are read RTL besides Hebrew or Arabic, let me know, I can add the metadata. I'm pretty sure those are the only two, but I'm no language expert.

@hay-kot hay-kot enabled auto-merge (squash) January 19, 2024 16:50
@hay-kot hay-kot merged commit 10ba4d2 into mealie-recipes:mealie-next Jan 19, 2024
9 checks passed
@michael-genson michael-genson deleted the feat/add-rtl-support-for-rtl-langs branch January 19, 2024 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants