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

Changing flag from right-align to left-align language place the final punctuation at the beginning #2075

Open
agrodet opened this issue Jan 18, 2020 · 2 comments
Labels
bug Issue that describes a problem with a feature that doesn't work as expected.

Comments

@agrodet
Copy link
Contributor

agrodet commented Jan 18, 2020

Please have a look at the log here https://tatoeba.org/fra/sentences/show/5228245
When I changed the flag to english, after reloading the page, the final punctuation was placed at the beginning of the sentence. I don't think it would happen very often, but that would nice to have that corrected.

@Yorwba
Copy link
Contributor

Yorwba commented Jan 18, 2020

This is a side-effect of trying to write with a left-to-right script when the language is set to use right-to-left only. In this case, user Joseph wrote a Hebrew sentence and then changed the text to English without changing the language. Because the language was still right-to-left, the final punctuation was placed to the left of the sentence. This probably looked wrong to the user, but instead of changing the language, they put the period in front (to the right). Then when you changed the language to English, the direction was changed to left-to-right and the period appeared on the other side.

One way to prevent this would be showing a hint to users to change the language if the currently set language of a sentence differs from the actual language. But that presupposes we can somewhat accurately detect when that happens, which I'm not too sure about.

@trang
Copy link
Member

trang commented Jan 18, 2020

I doubt Joseph intentionally left the sentence under Hebrew. I think what happened is a result of a bug (#1678):

  • He clicked on the edit button.
  • He clicked on the language icon and selected "English".
  • He changed the sentence (but the text input was still in RTL mode).
  • He saved the sentence.
  • The language reverted to Hebrew but he wouldn't see it unless he would refresh the page.

With the new sentence design, editing the sentence means editing both language and text at the same time (#2077) which solves the issue with #1678. From there, we'll have to ensure that the dir attribute of the text input is consistent with the selected language and that should solve this issue.

@trang trang added the bug Issue that describes a problem with a feature that doesn't work as expected. label Jan 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue that describes a problem with a feature that doesn't work as expected.
Projects
None yet
Development

No branches or pull requests

3 participants