Skip to content

Add support for right-to-left writing direction#363

Merged
davidhealey merged 11 commits intodavidhealey:masterfrom
EmilJunker:right-to-left
Oct 23, 2021
Merged

Add support for right-to-left writing direction#363
davidhealey merged 11 commits intodavidhealey:masterfrom
EmilJunker:right-to-left

Conversation

@EmilJunker
Copy link
Copy Markdown
Contributor

@EmilJunker EmilJunker commented Oct 2, 2021

This is an attempt to add proper RTL (right to left) language support to the app. It's not perfect and there are probably some rough edges here and there, but it's a start.

Here are some screenshots (in Hebrew as it's currently the only supported language for which it makes sense).

Diary page:

localhost_1

Diary settings:

localhost_2

Food editor:

localhost_3

@yarons I feel like you're the expert here. Does this look usable? Is this an improvement over the current version?

@yarons
Copy link
Copy Markdown
Collaborator

yarons commented Oct 3, 2021

Hey @EmilJunker , great work, thank you!

I just have some small comments :)
Hebrew acts just like English when referring to proportions, as you can see the Calories, Fat, Carbs all appear as 250 / 0 instead of 0 / 250 (These should be kept LTR in that case).

Can you send me the APK so I can test it further on my device?

Regardless of this effort, in Hebrew we're using a localized units so kcal should be in Hebrew (קק״ל) and g should be ג׳.

Thank you!

@EmilJunker
Copy link
Copy Markdown
Contributor Author

EmilJunker commented Oct 3, 2021

@yarons Here's an updated APK (since it's built by me it is unsigned and you probably need to uninstall the current version before installing mine)

app-debug.zip

@davidhealey
Copy link
Copy Markdown
Owner

@yarons you probably need to uninstall the current version before installing mine)

And back up your data first

@davidhealey
Copy link
Copy Markdown
Owner

Is this one ready to be merged?

@EmilJunker
Copy link
Copy Markdown
Contributor Author

Is this one ready to be merged?

It is up to @yarons if/when to merge this as he's the one who is going to suffer the consequences 😉

@EmilJunker EmilJunker force-pushed the right-to-left branch 2 times, most recently from 210c74e to 1c3511e Compare October 9, 2021 16:55
@yarons
Copy link
Copy Markdown
Collaborator

yarons commented Oct 9, 2021

Sorry for mixing other issues but there are few glitches.

IMAGE 2021-10-09 23:12:40
There are some untranslated strings here.

IMAGE 2021-10-09 23:23:09
Energy is still in English.

IMAGE 2021-10-09 23:23:42
These should be aligned right and the radio button should be on the left.

IMAGE 2021-10-09 23:24:35
This is what happens when my device is configured for Dark mode and the app doesn't.

BTW Changing the Dark mode toggle didn't change much, it was dark before selection.

Overall you did a very good job, thank you so much.

@EmilJunker
Copy link
Copy Markdown
Contributor Author

There are some untranslated strings here.

Energy is still in English.

I'll add the missing strings. Although I don't think we need to localize all the country and language names in the dropdown menus. It's fine if they stay in English.

These should be aligned right and the radio button should be on the left.

This is not possible according to Stackoverflow: https://stackoverflow.com/questions/28146034/how-to-make-text-align-right-in-selectbox-list-in-android-chrome. If anyone knows a way to do it, please tell me.

This is what happens when my device is configured for Dark mode and the app doesn't.

BTW Changing the Dark mode toggle didn't change much, it was dark before selection.

That's weird, On my phone, the device dark mode has no effect on the app. And the text should definitely become white when you enable the in app dark mode. Is this related to the RTL layout? What happens when you switch to a different language that doesn't use RTL?

@EmilJunker
Copy link
Copy Markdown
Contributor Author

I have made some more improvements to the RTL layout. The unit symbols (kcal, g, kg etc.) and all dialog buttons are now localized as well. Units of existing food items remain unchanged, though.

@yarons Here is an updated APK for you to try. This also includes all the latest features from release 3.1.11 and all the locale strings from the crowdin branch, so there really shouldn't be any more untranslated texts.

app-debug.zip

Please try it out and tell me if you think it's ready for release.

@EmilJunker
Copy link
Copy Markdown
Contributor Author

@yarons
Did you have an opportunity to test the APK I uploaded? What do you think? Is this ready to be merged now?

@yarons
Copy link
Copy Markdown
Collaborator

yarons commented Oct 23, 2021

Energy is translated, all the other issues I've mentioned are still there.

I think it's good enough for now, thank you.

@EmilJunker
Copy link
Copy Markdown
Contributor Author

Energy is translated, all the other issues I've mentioned are still there.

The strings "All", "Default", and "Detect automatically" in integration settings should be translated as well, no?

The other issues you mentioned are things I cannot fix, unfortunately.

I think it's good enough for now, thank you.

Great! Then I think we can merge this PR :)

@davidhealey davidhealey merged commit 8156b4f into davidhealey:master Oct 23, 2021
@EmilJunker EmilJunker deleted the right-to-left branch October 23, 2021 13:27
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.

3 participants