hovancik / stretchly

The break time reminder app
https://hovancik.net/stretchly
BSD 2-Clause "Simplified" License
4.58k stars 441 forks source link

[Bug]: RTL glitches and i18n missing strings #1428

Closed yarons closed 8 months ago

yarons commented 8 months ago

Version

Known issues

Existing issues

Advanced Preferences

What operating system are you using?

macOS

Operating System Version

Sonoma 14.2.1

Reproduction steps

  1. Switch to Hebrew or Arabic
  2. Open the preferences

Reproduces how often: Always

Expected Behavior

Should align neatly

Actual Behavior

Some elements misbehave and some are not translated

The top bar is aligned to the left. The text under the heart icon is LTR. The words seconds and minutes are untranslated. The speaker icon is too close to the text.

Relevant log output

No response

Preferences

No response

Additional information

Screenshot 2024-01-30 at 9 54 56 Screenshot 2024-01-30 at 9 55 01 Screenshot 2024-01-30 at 9 55 06

Code of Conduct

hovancik commented 8 months ago

Hi,

translations are community effort, you can help here: https://hosted.weblate.org/projects/stretchly/

Unfortunately, I don't speak Hebrew or Arabic so not sure how it should look like. PRs would be appreciated.

yarons commented 8 months ago

@hovancik I am translating this project already :) The problem is the RTL alignment and the fact that these terms are translated yet appear in the native language regardless, as you can see in the screenshots.

hovancik commented 8 months ago

Gotcha, the syncing process to the app is manual, so new translations appear once I make a new version.

yarons commented 8 months ago

Hmmm I highly doubt that, this string was translated around 2 years ago: https://hosted.weblate.org/translate/stretchly/stretchly/he/?q=minutes&sort_by=-priority%2Cposition&checksum=#history And it was submitted to the repository: https://github.com/hovancik/stretchly/blob/7038e073e6048f6f55a292595fbdef01eec2e334/app/locales/he.json#L205 It looks like an i18n issue, I can't verify it with other languages but it does look like it.

hovancik commented 8 months ago

Seems like we have it wrong?

    "minutes_one": "דקה",
    "minutes_two": "{{count}} דקות",
    "minutes_many": "{{count}} דקות",
    "minutes_other": "{{count}} דקות",

This https://jsfiddle.net/6bpxsgd4 suggests it should be _one, _two, _other. But not sure why extra element would be an issue.

hovancik commented 8 months ago

Ah, other languages have the same issue, will try to look at it. Do you remember if this was issue as well in previous versions?

hovancik commented 8 months ago

So it seems it's not issue with i18next but with how I am refreshing translations after changing language. Can you try hitting Cmd+R after changing the language? For me I can see correct translations then:

image

Or after Stretchly restarts / Preferences gets reopened

I have found the issue and made a quick fix.

yarons commented 8 months ago

Thank you! What about the RTL glitches I've mentioned?

hovancik commented 8 months ago

Could you please explain / show how the correct one should look like? It's hard for me to imagine what is wrong

The top bar is aligned to the left.
The text under the heart icon is LTR.
yarons commented 8 months ago

Settings should be rightmost, then Scheduling, Themes and About, while the support button should appear leftmost.

Regarding the text on the support button, this is the right form:

תמיכה ב־Stretchly‏ (Starting from the right).

The current wrong layout is: ‎תמיכה ב־Stretchly It looks like Stretchly Support instead of vice versa.

Also the speaker is too close to the text in the Theme tab.

Thanks :)

hovancik commented 8 months ago

Thanks, regarding Support button, I guess translation should be changed? "heart": "תמיכה ב־Stretchly",

Others seems to fit: image

hovancik commented 8 months ago

Ah, I think I found it. Is this correct?

image

yarons commented 8 months ago

Great! It looks way better! The "Preferred language" box has its combobox arrow aligned to the right instead of left but I think it's a small price to pay after all the great job you've been doing, thank you :)

hovancik commented 8 months ago

Thanks for all the feedback, I think I was able to fix the select as well :)

yarons commented 8 months ago

Thank you so much!

One last thing that I've noticed and I'm not sure it's possible to fix without setting the whole system to RTL: תמונה

The menus are left aligned on mac.

hovancik commented 8 months ago

This is what I see on Linux, but no idea what the correct way is: image From what I read in Electron docs, there is no such an option in Menus :(