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

Wrong direction while using the Latin script within Ottoman Turkish #1780

Closed
Guybrush88 opened this Issue Feb 10, 2019 · 10 comments

Comments

Projects
None yet
4 participants
@Guybrush88
Copy link

Guybrush88 commented Feb 10, 2019

As reported by soliloquist on the wall:

I have problems adding Ottoman Turkish sentences written in Latin script. The punctuation order gets corrupted and it looks weird. The system only works properly when using Arabic script with Ottoman Turkish.

Some languages are written in more than one script. Like Azerbaijani (Latin, Arabic and Cyrillic), Kurdish (Latin and Arabic) or Serbian (Latin and Cyrillic).

I guess there are Serbian sentences written in both Latin and Cyrillic scripts on Tatoeba. It isn't a problem when the script direction is same as in Serbian, but if the direction is different, it becomes difficult to use the script other than the 'default' one.

Can't something be done about it?

https://tatoeba.org/ita/wall/show_message/31315#message_31315

@Guybrush88

This comment has been minimized.

Copy link
Author

Guybrush88 commented Feb 10, 2019

examples of this are on dev

@soliloquist-tatoeba

This comment has been minimized.

Copy link

soliloquist-tatoeba commented Feb 12, 2019

Thanks for carrying the issue I mentioned on the Wall to GitHub.

Actually, this problem isn't limited to Ottoman Turkish. It affects all languages that can be written in both left-to-right and right-to-left scripts. Sentences written in the non-default script get visually corrupted. Languages using Latin & Cyrillic scripts are not affected from this as they're both left-to-right, but others using Latin & Arabic scripts are.

The 'unknown' flag allows both left-to-right and right-to-left scripts.

https://tatoeba.org/eng/sentences/show/7771502

So technically, I think it should be possible to apply this flexibility to other affected languages.

@trang trang added the regression label Feb 14, 2019

@soliloquist-tatoeba

This comment has been minimized.

Copy link

soliloquist-tatoeba commented Feb 14, 2019

Some affected languages

Ottoman Turkish
Ottoman Turkish is a historical language written in the Arabic script, but today, many Turks write Ottoman Turkish expressions in the Latin script. There are many transliterated Ottoman Turkish examples in literature textbooks. It's easier to read and learn the old language this way.

Kurdish
https://en.wikipedia.org/wiki/Kurdish_alphabets

Uyghur
https://en.wikipedia.org/wiki/Uyghur_alphabets
https://en.wikipedia.org/wiki/Uyghur_Latin_alphabet

Azerbaijani
https://en.wikipedia.org/wiki/Azerbaijani_alphabet

@trang trang added this to the 2019-02-17 milestone Feb 16, 2019

@trang trang self-assigned this Feb 16, 2019

@trang trang removed the regression label Feb 16, 2019

@trang trang removed this from the 2019-02-17 milestone Feb 16, 2019

@trang trang added the enhancement label Feb 16, 2019

@trang

This comment has been minimized.

Copy link
Member

trang commented Feb 16, 2019

Currently we define the direction based on the language:
https://github.com/Tatoeba/tatoeba2/blob/dev/src/Lib/LanguagesLib.php#L605

We will need to base it on the script instead.

@jiru

This comment has been minimized.

Copy link
Member

jiru commented Feb 18, 2019

We could just set the direction to "auto". I believe an easy and non-harmful way to solve the problem.

@soliloquist-tatoeba

This comment has been minimized.

Copy link

soliloquist-tatoeba commented Mar 10, 2019

The other issue reported on the same thread about Chinese is fixed. If a simple and nonharmful solution is possible with a few code changes as jiru suggested, can we give it a try? You can revert back if something goes wrong or apply it to other languages in the future if it works fine.

@trang

This comment has been minimized.

Copy link
Member

trang commented Mar 11, 2019

Yes, we can definitely use dir="auto" for Ottoman Turkish. I think as well that it's an appropriate solution.

@trang trang added this to the 2019-03-17 milestone Mar 11, 2019

@soliloquist-tatoeba

This comment has been minimized.

Copy link

soliloquist-tatoeba commented Mar 11, 2019

Thank you. Please inform me when it's implemented, so I can test it and report back to you.

trang added a commit that referenced this issue Mar 14, 2019

@trang

This comment has been minimized.

Copy link
Member

trang commented Mar 14, 2019

@soliloquist-tatoeba It's implemented and deployed on our dev website. I added the same two sentences you added on the main website and set the language to Ottoman Turkish: https://dev.tatoeba.org/eng/sentences/show/6784589.

Feel free to test further and close this issue if it looks fine for you.

It will be deployed to the main website this weekend.

@soliloquist-tatoeba

This comment has been minimized.

Copy link

soliloquist-tatoeba commented Mar 14, 2019

I have just tested and it works great. Both RTL and LTR sentences are shown correctly. The cosmetic issue seems to be resolved. Thank you very much. I also thank jiru for the idea and Guybrush for opening the issue.

If a similar request comes from Uyghur or Kurdish speakers in the future, you can just apply the same thing on those languages, too. They're in a similar situation.

@trang trang closed this Mar 17, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.