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

dir=auto for comments #7109

Closed
2 tasks done
yarons opened this issue Jan 17, 2022 · 6 comments
Closed
2 tasks done

dir=auto for comments #7109

yarons opened this issue Jan 17, 2022 · 6 comments
Assignees
Labels
enhancement Adding or requesting a new feature.
Milestone

Comments

@yarons
Copy link
Contributor

yarons commented Jan 17, 2022

Describe the issue

When adding a comment in Hebrew (or Arabic, Farsi, Kurdish, etc.) for a string the comment is aligned according to LTR regardless of the script.

The comment editing dialog showing the text aligned to the left while the visual character is aligned right.
If the entire comment starts with an RTL script (it's a problem when I'm mentioning someone) all the text is aligned right.

I already tried

  • I've read and searched the documentation.
  • I've searched for similar issues in this repository.

Steps to reproduce the behavior

  1. Go to some term for translation
  2. Switch to the comment section
  3. Write the following comments (write the first one, then delete and write the second one):
    '@nijel שלום לך'
    'שלום לכולם'
  4. See error

Expected behavior

Text should be aligned right when most of the text or at least the beginning is in RTL script.

Screenshots

Screen Shot 2022-01-17 at 13 39 50

Exception traceback

None

How do you run Weblate?

weblate.org service

Weblate versions

No response

Weblate deploy checks

No response

Additional context

I truly like the way Weblate supports RTL languages, we should keep the momentum :)

@nijel
Copy link
Member

nijel commented Jan 17, 2022

There used to be dir="auto" but it was removed in 29b8091 (probably unintentionally). However for me it makes no difference - it still renders as LTR when the text starts with LTR text (user mention). The only way to make it RTL is using dir="rtl".

@yarons
Copy link
Contributor Author

yarons commented Jan 17, 2022

But it'll break English (LTR) comments in RTL interface :(

@nijel
Copy link
Member

nijel commented Jan 17, 2022

We can do this based on the language

@yarons
Copy link
Contributor Author

yarons commented Jan 17, 2022

Of the comments itself? That sounds good.

@nijel
Copy link
Member

nijel commented Jan 17, 2022

Of the language being commented, that usually matches the language of the comment.

@nijel nijel self-assigned this Jan 18, 2022
@nijel nijel added the enhancement Adding or requesting a new feature. label Jan 18, 2022
@nijel nijel added this to the 4.11 milestone Jan 18, 2022
@nijel nijel closed this as completed in 030f9c2 Jan 18, 2022
@github-actions
Copy link

Thank you for your report; the issue you have reported has just been fixed.

  • In case you see a problem with the fix, please comment on this issue.
  • In case you see a similar problem, please open a separate issue.
  • If you are happy with the outcome, don’t hesitate to support Weblate by making a donation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Adding or requesting a new feature.
Projects
None yet
Development

No branches or pull requests

2 participants